0

I use library net in Node JS for create socket server

All of things is good and very good working.

But it get error sometimes

Error is : events.js:163 throw er; // Unhandled 'error' event ^

Error: read ECONNRESET at exports._errnoException (util.js:1050:11) at TCP.onread (net.js:581:26)

1 Answer 1

1

this event triggered while the connection is dead. did you handle the server-side close event? like this

socket.on("close",function(){
 //you can't handle the network operation anymore after this by the socket object
})

the heartbeat measure is necessary in socket project.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.