We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8aa3f51 commit e8a85e0Copy full SHA for e8a85e0
clippy.toml
@@ -0,0 +1 @@
1
+ignore-interior-mutability = ["bytes::Bytes", "engineioxide::Str"]
socketioxide/src/client.rs
@@ -75,6 +75,8 @@ impl<A: Adapter> Client<A> {
75
if let Some(ns) = self.get_ns(&ns_path) {
76
tokio::spawn(connect(ns, esocket.clone()));
77
} else if let Ok(Match { value: ns_ctr, .. }) = self.router.read().unwrap().at(&ns_path) {
78
+ // We have to create a new `Str` otherwise, we would keep a ref to the original connect packet
79
+ // for the entire lifetime of the Namespace.
80
let path = Str::copy_from_slice(&ns_path);
81
let ns = ns_ctr.get_new_ns(path.clone());
82
self.nsps.write().unwrap().insert(path, ns.clone());
0 commit comments