wip
This commit is contained in:
@@ -43,6 +43,7 @@ impl ActiveClientsStore {
|
||||
///
|
||||
/// * `client`: address of the client for which to remove the handle.
|
||||
pub(crate) fn disconnect(&self, client: DestinationAddressBytes) {
|
||||
log::debug!("ActiveClientsStore:: explicit disconnect: {}", client);
|
||||
self.0.remove(&client);
|
||||
}
|
||||
|
||||
@@ -53,6 +54,7 @@ impl ActiveClientsStore {
|
||||
/// * `client`: address of the client for which to insert the handle.
|
||||
/// * `handle`: the sender channel for all mix packets to be pushed back onto the websocket
|
||||
pub(crate) fn insert(&self, client: DestinationAddressBytes, handle: MixMessageSender) {
|
||||
log::debug!("ActiveClientsStore::insert: {}", client);
|
||||
self.0.insert(client, handle);
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ pub(crate) struct AuthenticatedHandler<R, S, St> {
|
||||
// explicitly remove handle from the global store upon being dropped
|
||||
impl<R, S, St> Drop for AuthenticatedHandler<R, S, St> {
|
||||
fn drop(&mut self) {
|
||||
log::debug!("AuthenticatedHandler::drop");
|
||||
self.inner
|
||||
.active_clients_store
|
||||
.disconnect(self.client.address)
|
||||
@@ -134,6 +135,7 @@ where
|
||||
|
||||
/// Explicitly removes handle from the global store.
|
||||
fn disconnect(self) {
|
||||
log::debug!("AuthenticatedHandler::disconnect");
|
||||
self.inner
|
||||
.active_clients_store
|
||||
.disconnect(self.client.address)
|
||||
|
||||
Reference in New Issue
Block a user