Listener fix#228
Open
notgiven688 wants to merge 4 commits intostatianzo:masterfrom
notgiven688:listener-fix
Open
Listener fix#228notgiven688 wants to merge 4 commits intostatianzo:masterfrom notgiven688:listener-fix
notgiven688 wants to merge 4 commits intostatianzo:masterfrom
notgiven688:listener-fix
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) |
statianzo
reviewed
May 1, 2018
| acceptDone.Set (); | ||
| OnClientConnect (s); }, | ||
| e => { FleckLog.Error ("Error while listening for new clients", e); | ||
| if (RestartAfterListenError) TryRestart (); |
Owner
There was a problem hiding this comment.
Given this should properly separate listener and client errors, I'm not sure if having the restart is necessary.
Contributor
Author
|
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(?). |
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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