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

wrong assertion test for wsi->sock #10

Closed
mhaberler opened this issue Aug 28, 2013 · 1 comment
Closed

wrong assertion test for wsi->sock #10

mhaberler opened this issue Aug 28, 2013 · 1 comment

Comments

@mhaberler
Copy link

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.

@warmcat
Copy link
Collaborator

warmcat commented Oct 13, 2015

You were right. This got refactored into check against == LWS_INVALID_FILE a while ago.

@warmcat warmcat closed this as completed Oct 13, 2015
@fog1111 fog1111 mentioned this issue Nov 24, 2017
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

No branches or pull requests

1 participant