-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fail blocking socket operations loudly #16047
Comments
The full traceback is:
console log of the listening socket
|
Looks like a bug in emscripten/src/library_sockfs.js Lines 565 to 567 in 583000b
Looks like an easy fix if you have time to write a PR. |
So a blocking accept call should is fine, it's only an error if it can't be fulfilled synchronously? Sounds good if so. |
Yes, I don't think crash relates specifically to blocking vs non-blocking. At the same time, I don't see any support in the code there for blocking (but that isn't the proximate cause of the crash). |
``accept()`` syscall no longer crashes with error message ``TypeError: Cannot read property 'stream' of undefined`` when sockfs has no pending listen socket. The syscall now returns ``EINVAL`` on error. See: emscripten-core#16047 Signed-off-by: Christian Heimes <christian@python.org>
``accept()`` syscall no longer crashes with error message ``TypeError: Cannot read property 'stream' of undefined`` when sockfs has no pending listen socket. The syscall now returns ``EINVAL`` on error. See: #16047 Signed-off-by: Christian Heimes <christian@python.org> * Combine check for server and pending
It seems this issue was resolved & can be closed? |
Would it make sense to fail blocking socket operations fail with an error code or a JavaScript exception?
@tiran encountered a
TypeError: Cannot read property 'stream' of undefined
error when calling accept on a blocking socket that was more confusing thanError: accept call on blocking socket is not supported
would have been.The text was updated successfully, but these errors were encountered: