有一种情况发生会导致如下的错误发生。这种情况发生于客户端调试状态,socket还保持连接,但是没有维持心跳包,然后客户端突然断开,而服务端还不断的往这个session发送网络数据,导致发生异常
websocket send binary data failed: "Error: not opened\n at WebSocket.send (D:\\project\\gameBilliards\\g
ame-server\\node_modules\\pomelo\\node_modules\\ws\\lib\\WebSocket.js:217:38)\n at Socket.sendRaw (D:\\project\\gameB
illiards\\game-server\\node_modules\\pomelo\\lib\\connectors\\hybridsocket.js:65:15)\n at Socket.send (D:\\project\\g
ameBilliards\\game-server\\node_modules\\pomelo\\lib\\connectors\\hybridsocket.js:84:8)\n at Session.send (D:\\projec
t\\gameBilliards\\game-server\\node_modules\\pomelo\\lib\\common\\service\\sessionService.js:517:19)\n at send (D:\\p
roject\\gameBilliards\\game-server\\node_modules\\pomelo\\lib\\common\\service\\sessionService.js:415:11)\n at Sessio
nService.sendMessage (D:\\project\\gameBilliards\\game-server\\node