From ae93cfed50c59806c04f2a082a48158515f6d43c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 1 Mar 2022 18:17:41 -0800 Subject: [PATCH] Tear down client's connection states when dropping test clients --- crates/client/src/client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 5126c9384c..e338b72e74 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -230,10 +230,12 @@ impl Client { #[cfg(any(test, feature = "test-support"))] pub fn tear_down(&self) { let mut state = self.state.write(); + state._maintain_connection.take(); state.message_handlers.clear(); state.models_by_message_type.clear(); state.models_by_entity_type_and_remote_id.clear(); state.entity_id_extractors.clear(); + self.peer.reset(); } #[cfg(any(test, feature = "test-support"))]