How do I debug error ECONNRESET in Node.js?

后端 未结 14 1449
刺人心
刺人心 2020-11-22 04:02

I\'m running an Express.js application using Socket.io for a chat webapp and I get the following error randomly around 5 times during 24h. The node process is wrapped in for

14条回答
  •  轮回少年
    2020-11-22 04:25

    Try adding these options to socket.io:

    const options = { transports: ['websocket'], pingTimeout: 3000, pingInterval: 5000 };
    

    I hope this will help you !

提交回复
热议问题