You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a random server that doesn't accept websocket connections, the promise resolves, but the Eio.Switch.run never returns (presumable because there are hanging fibers):
Is there a technical reason for that? Once the error handler has been called, the connection is dead, so I would assume that it's closed automatically. At the very least, I would suggest documenting this requirement.
I suppose we can do both: there are errors that aren't recoverable, and we could shutdown the runtime immediately; we should likely also document this limitation if we can't make it work in the general case.
The reasoning is two-fold, I think:
httpun-ws is not yet that battle-tested and further improvements are constantly being worked on (thanks for reporting issues as you're finding them, btw)
this is a rather low-level library that other packages such as dream or piaf build upon
Using the wscat example modified to resolve the promise on error, and with some extra logging:
With a random server that doesn't accept websocket connections, the promise resolves, but the
Eio.Switch.run
never returns (presumable because there are hanging fibers):Note that
websocket_handler
is never called, so I don't think it's the input reading loop.The text was updated successfully, but these errors were encountered: