-
Notifications
You must be signed in to change notification settings - Fork 585
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
Listener fix #228
base: master
Are you sure you want to change the base?
Listener fix #228
Conversation
✅ Build Fleck 0.0.17-ci completed (commit b25f31f2cc by @notgiven688) |
1 similar comment
✅ Build Fleck 0.0.17-ci completed (commit b25f31f2cc by @notgiven688) |
acceptDone.Set (); | ||
OnClientConnect (s); }, | ||
e => { FleckLog.Error ("Error while listening for new clients", e); | ||
if (RestartAfterListenError) TryRestart (); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this should properly separate listener and client errors, I'm not sure if having the restart is necessary.
I am also not 100% sure. The idea is that a real servet socket error should be handled by a restart. In my tests this error never happened - so it is redundant in the worst case. We could remove it(?). |
I verified that the RestartOnError is still useful. In some cases people forgot to set appropriate file descriptor levels (they have ~50k clients). Here the websocket is correctly restarted after failing. |
In short: Fixes a problem with unnecessary listener socket restarts. Possible improvement of stability and memory, since Socket.Accept is not called in a recursive manner.
A solution for the problems mentioned here: #225
Should replace the pull-request made here: #226