Unverified Commit 7a33bf50 authored by Niklas Adolfsson's avatar Niklas Adolfsson Committed by GitHub
Browse files

[ws server]: terminate already established connection(s) when the server is stopped (#396)



* [ws server]: terminate connection when closed.

* fix tests

* add test

* address grumbles: return Ok when server stopped

* revert log

* revert outdated documentation

* use wrapping add for conn id

* address grumbles: replace Mutex with AtomicBool

* add comment to assertion

* fix nits

* address grumbles: naming of variables

* address grumbles: RwLock to wait for tasks

This commit introduces a RwLock instead of the Mutex to the shared by the background tasks
and the stop handle won't signal until all readers has been dropped.

* fix nit

* Update ws-server/src/server.rs

* remove AtomicBool; use stop_sender instead

* Update ws-server/src/server.rs

* Update ws-server/src/server.rs

Co-authored-by: default avatarDavid <[email protected]>

* correct subscription err messages

Co-authored-by: default avatarDavid <[email protected]>
parent 8b65edf8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment