node.js websocket crashes when client disconnect

前端 未结 3 1359
执念已碎
执念已碎 2021-02-10 16:11

I am very new to NodeJS and Websockets, but i am trying to play with it.

What i do is read incoming datas from Serial port, then send these dat

3条回答
  •  我在风中等你
    2021-02-10 16:30

    I think, you should remove the socket from your CLIENTS array on both close and error event. Otherwise it tries to send a message to a socket that is closed.

提交回复
热议问题