Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Calling close on Server raises ConcurrentModificationError #23

Closed
maperz opened this issue Jun 19, 2020 · 0 comments
Closed

[BUG] Calling close on Server raises ConcurrentModificationError #23

maperz opened this issue Jun 19, 2020 · 0 comments
Labels

Comments

@maperz
Copy link

maperz commented Jun 19, 2020

Calling close on an instance of Server crashes with a ConcurrentModificationError when any clients are connected.

This happens due to removing sockets from the nsps["/"].sockets list while iterating over it.
As a quick fix for now I came up with following solution:

while (nsps['/'].sockets.length > 0)
{
   var socket = nsps['/'].sockets.first;
   socket.onclose();
}

Is this a know issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants