events.js:72
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party at Socket.writeAfterFIN [as write] (net.js:274:12) at broadcast (C:\nodejs\app.js:19:15) at Socket.<anonymous> (C:\nodejs\app.js:60:5) at Socket.EventEmitter.emit (events.js:95:17) at Socket.<anonymous> (stream_readable.js:710:14) at Socket.EventEmitter.emit (events.js:92:17) at emitReadable (_stream_readable.js:382:10) at emitReadable (_stream_readable.js:378:5) at readableAddChunk (_stream_readable.js:143:7) at Socket.Readable.push (_stream_readable.js:113:10)
这不是提示socket 被结束了么
我是在刷新页面的时候,断开重连,断开的时候socket肯定会结束,该怎么解决呢?
@438041502 那就不能用已经断开的SOCKET对象了,看提示你这个应该是用了已经断开的SOCKET。
监听err,然后重连试试。
多谢两位,找到原因了,延时发送造成的,结束了延时发送就找不到socket了,感谢回答!
@438041502 能解释一下延时发送 是什么样的场景么?