Use a synchronous mutex for ConnectionPool
This commit is contained in:
parent
a594ba8f8a
commit
d4c8fa3090
3 changed files with 20 additions and 20 deletions
|
@ -23,6 +23,11 @@ pub struct Connection {
|
|||
}
|
||||
|
||||
impl ConnectionPool {
|
||||
pub fn reset(&mut self) {
|
||||
self.connections.clear();
|
||||
self.connected_users.clear();
|
||||
}
|
||||
|
||||
#[instrument(skip(self))]
|
||||
pub fn add_connection(&mut self, connection_id: ConnectionId, user_id: UserId, admin: bool) {
|
||||
self.connections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue