-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Closing the server does not clear polling timers #2069
Comments
+1 |
Any updates on this? This is creating a real problem in karma right now, as the the timers stop the process from exiting cleanly at the end. See karma-runner/karma#1788 for details |
@oniono please stop, otherwise I'll have to report your account for abuse |
👍 I think it should be fixed asap |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+1 |
While I'm thankful for the sudden amount of attention this issue is getting, please don't fill up the comments with +1s. All that does is annoy project maintainers. Explanations of why this bug affects you are much more effective. |
We've merged a solution for this and it will shortly be in a release. |
If a socket is in the process of upgrading when io.close is called, the server won't exit cleanly until the polling connection pings out.
Here's a test case:
The server will output "shutdown", but the process will not exit until the socket times out two minutes later (if debug is setup to show socket.io, you can see the timeout event). If I delay the close 5 seconds to allow the socket to upgrade, then the process exits cleanly.
The only workaround I can come up with is to force process exit in the server close event. Unfortunately, the reason I made this test case was that my main application never fires the close event. I can't seem to reproduce that in a test case, but I suspect it might be related to this issue.
The text was updated successfully, but these errors were encountered: