Node.js 错误:套接字与socket.io挂起
对于Socket.IO,我在服务器端得到如下错误: 警告::错误:套接字挂起 在createHangUpError(http.js:1360:15) 在ServerResponse.OutgoingMessage.\u writeRaw(http.js:507:26) 在ServerResponse.OutgoingMessage.\u发送(http.js:476:15) 在ServerResponse.OutgoingMessage.write(http.js:749:16) 在XHRPolling.doWrite(节点\u modules\socket.io\lib\transports \xhr polling.js:67:17) 在XHRPolling.HTTPPolling.write(node_modules\socket.io\lib\ transports\http polling.js:132:82 在XHRPolling.Transport.onDispatch(节点\u modules\socket.io\l ib\transport.js:222:10) 位于Manager.onDispatch(\node\u modules\socket.io\lib\Manager.js :392:31) 在SocketNamespace.packet(\node\u modules\socket.io\lib\namesp ace.js:156:16) 在SocketNamespace.emit(\node\u modules\socket.io\lib\namespac e、 js:188:15) 在\gbin1平台\server-version1-broadcast-20131016.js:263:2 9 在Client.get(\node\u modules\socket.io\lib\stores\memory.js:8 6:3) 位于Socket.get(\node\u modules\Socket.io\lib\Socket.js:258:14) 我在下面添加代码以捕获套接字挂起错误,否则应用程序将退出:Node.js 错误:套接字与socket.io挂起,node.js,socket.io,Node.js,Socket.io,对于Socket.IO,我在服务器端得到如下错误: 警告::错误:套接字挂起 在createHangUpError(http.js:1360:15) 在ServerResponse.OutgoingMessage.\u writeRaw(http.js:507:26) 在ServerResponse.OutgoingMessage.\u发送(http.js:476:15) 在ServerResponse.OutgoingMessage.write(http.js:749:16) 在XHRPoll
process.on('uncaughtException', function (exception) {
// handle or ignore error
error(exception.stack);
});
但有了上面的代码,它无法真正处理套接字handup错误,只能确保应用程序不会崩溃,代码也不会再工作。我如何才能真正解决上面的错误