-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
wrong assertion test for wsi->sock #10
Comments
Closed
You were right. This got refactored into check against == LWS_INVALID_FILE a while ago. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the test in https://github.com/warmcat/libwebsockets/blob/master/lib/libwebsockets.c#L116 doesnt make sense
file descriptor 0 is legit after an accept - in particular you will get this if you have a demon-type setup where stdin, stdout stderr are typically closed. The way fd's are recycled you will get fd 0 on first accept after closing stdin.
suggestion: remove or mark an invalid fd as < 0.
The text was updated successfully, but these errors were encountered: