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
Completely related: nodejs/node#23169 (so this may be a bug in Node or a behaviour change).
Basically, if within the wsServer.on("request") event I reject the WS connection attempt (by calling request.reject(), there is an unhandled "error" event emitted by request.httpRequest.socket.
In Node 8 the socket emits "error" event, but nothing happens if there is no event listener for it. However in Node 10, if there is no listener for that "error" event, the whole process fails with:
events.js:167
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
So, may be WebSocket-Node should at least place an empty "error" listener in the socket?
The text was updated successfully, but these errors were encountered:
ibc
added a commit
to versatica/protoo
that referenced
this issue
Mar 7, 2019
Completely related: nodejs/node#23169 (so this may be a bug in Node or a behaviour change).
Basically, if within the
wsServer.on("request")
event I reject the WS connection attempt (by callingrequest.reject()
, there is an unhandled "error" event emitted byrequest.httpRequest.socket
.In Node 8 the
socket
emits "error" event, but nothing happens if there is no event listener for it. However in Node 10, if there is no listener for that "error" event, the whole process fails with:So, may be WebSocket-Node should at least place an empty "error" listener in the
socket
?The text was updated successfully, but these errors were encountered: