は、このエラーをキャッチするための良い方法があります:ノードのWebSocketサーバ - 私はexpressjsでこれを使用していETIMEDOUTエラー
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 out
node.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)
私はこの句に追加しますので、これは動作するはず?
ws.websocketServer.on('error', function (error) { console.log('Error: ' + error); });
WebSocketにはどのモジュールを使用していますか? – Matt
websocket-server:https://github.com/miksago/node-websocket-server –
これをテストするブラウザはどれですか? –