• Niklas Adolfsson's avatar
    [ws server]: terminate already established connection(s) when the server is stopped (#396) · 7a33bf50
    Niklas Adolfsson authored
    
    
    * [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]>
    7a33bf50