Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Client Disconnects  RSS feed

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it normal to receive Connection reset by peer exceptions in the server when the client disconnects abruptly (without logging out per se)?
What is the best way to handle this?
Try to close the connection and continue on?
Thanks,
Drew
 
Jon Wu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Drew Lane:
Is it normal to receive Connection reset by peer exceptions in the server when the client disconnects abruptly (without logging out per se)?
What is the best way to handle this?
Try to close the connection and continue on?
Thanks,
Drew

Yes this is normal. When this happens the socket is closed on the server side also so you don't have to try to close the connection. Just continue on.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!