I’m using this with expressjs, is there a good way to catch this error:
WS: 179575738318 end WS: 179575738318 stateChange: 4 -> 5 WS:
179575738318 socket closed WS: 179575738318 stateChange: 5 -> 6
Manager: Detached: (11) WS: 179575734517 end
WS: 179575734517 stateChange: 4 -> 5 WS: 179575734517 socket closed
WS: 179575734517 stateChange: 5 -> 6 Manager: Detached: (10) WS: 179575734515 error Error: ETIMEDOUT, Connection
timed outnode.js:134
throw e; // process.nextTick error, or ‘error’ event on first
tick
^ Error: ETIMEDOUT, Connection timed out
at Socket._readImpl (net.js:163:14)
at Socket._onReadable (net.js:633:22)
at IOWatcher.onReadable [as callback] (net.js:177:10)
I add in this clause, so this should work?
ws.websocketServer.on(‘error’, function (error) {
console.log(‘Error: ‘ + error); });
ws.websocketServer.on(‘error’, function (error) { console.log(‘Error: ‘ + error); }); did it.