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
So I usually receive this error while the script is running:
events.js:292
throw er; // Unhandled 'error' event
^
Error: socket hang up
at connResetException (internal/errors.js:607:14)
at TLSSocket.socketOnEnd (_http_client.js:493:23)
at TLSSocket.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketOnEnd (_http_client.js:493:9)
at TLSSocket.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'ECONNRESET'
}
My app subscribe to the block event (provider.on("block", ...)). I followed #1053 to add reconnection ability but somehow the exception still went throw and the whole app crashes. I even added extra try/catch and on("error") handle (see below).
Describe the bug
So I usually receive this error while the script is running:
My app subscribe to the block event (
provider.on("block", ...)
). I followed #1053 to add reconnection ability but somehow the exception still went throw and the whole app crashes. I even added extra try/catch andon("error")
handle (see below).Environment:
NodeJS v14.16.1 on Windows 10 Pro and Windows Server 2019.
Node Client is latest stable Geth on Windows Server 2019.
Search Terms
WebSocket, reconnect, socket hang up
Please advice on how to fix this, and if possible is there a way that I can "simulate" a WS disconnect to test if my fix works? Thanks
The text was updated successfully, but these errors were encountered: