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

Remove websocket close call causing infinite recursion #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Rob-Crane
Copy link

Call to ws.close() will immediately call the onDisconnection callback again creating an infinite recursion. Fix is to delete redundant call to ws.close().

Fix tested in recent Debian distribution.

@mvirgo
Copy link
Contributor

mvirgo commented Jan 5, 2019

I'll need to do some further testing on this one...looks like it does get rid of the infinite recursion (preventing a Seg Fault at least on Mac), which allows the Disconnected message to be output, but then the program doesn't terminate on its own anymore. The infinite recursion seems to have been a crude method to get the program to end.

@Rob-Crane Rob-Crane force-pushed the socket_close_recurse branch from beac693 to 6678f2b Compare January 5, 2019 22:02
@Rob-Crane
Copy link
Author

I didn't see any option in uWebSockets for exiting on disconnect. Here'a a different branch that will just reset the filter on disconnect (if that's preferred).

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

Successfully merging this pull request may close these issues.

2 participants