-
Notifications
You must be signed in to change notification settings - Fork 237
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
embedded:io/socket/listener
locks up Win simulator
#1428
Comments
Last I checked, the unit tests for Listener passed on Windows. We'll take another look. |
The listener on Windows has a bug where it would end up as a blocking socket, rather than non-blocking. This led to the stalls you see. There are two places to fix that., Line 176: ioctlsocket(tcp->skt, FIONBIO, &nonBlocking); And line 577: ioctlsocket(listener->skt, FIONBIO, &nonBlocking); There is also a smaller issue – a small memory leak if an exception occurs in the constructor – which will fixed when the above changes are integrated into the SDK. |
Patch applied and fix confirmed. Thank you! |
Build environment: Windows
Moddable SDK version: 5.1.0
Target device: Win simulator.
Description
I'm trying to get
embedded:network/http/server
to work onwin
simulator, but it locks up (does not respond) the simulator process and requires it to be hard terminated. The examples forlistener/httpserver
andlistener/listen
exhibit the failure, indicating the bug is likely related tolistener
.Both examples work on
esp32
, but forhttpserver
a trivial bug inexamples/io/tcp/websocket/WebSocket.js
on line 51 needs to be fixed to not throw an error (doesn't affect the crash issue). Changeif (href)
toelse if (href)
, as the prior check forobject
has identified this is an attachment and there is nohref
.Steps to Reproduce
examples/io/listener/listen
orexamples/io/listener/httpserver
on windows simulatorThe text was updated successfully, but these errors were encountered: