You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Calling delete_ns blocks the thread because the RWLock does not get released after going out of scope
To Reproduce
let io_clone = Arc::new(io.clone());
io.ns("/",move |socket_ref:SocketRef| {info!("Connected!");
socket_ref.on_disconnect(move || {
io_clone.delete_ns("/");info!("This won't run, because the thread is blocked by RWLock");})});
Connect a client on '/', disconnect it, and the info won't get called. After that, the server does not work anymore and won't accept new connections.
Expected behavior
The server should continue running like usual
Versions (please complete the following information):
Socketioxide version: 0.12.0
Http lib: 0.7.5
Socket.io client version ^4.7.5
The text was updated successfully, but these errors were encountered:
Hey, indeed, there is a deadlock when you call delete_ns from on_disconnect because the Namespace RwLock is currently being readen. I'll try to fix this ASAP and also add a test case.
Describe the bug
Calling delete_ns blocks the thread because the RWLock does not get released after going out of scope
To Reproduce
Connect a client on '/', disconnect it, and the info won't get called. After that, the server does not work anymore and won't accept new connections.
Expected behavior
The server should continue running like usual
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: