• Post Reply Bookmark Topic Watch Topic
  • New Topic

why server closed and displays Recv failure: Connection reset by peer ?

 
Karri Tata Rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I had developed GUI which is client computer interface. My GUI has CONNECT button which is double as connect and disconnect. When I clicked on connect client connects to server (server maintained on Linux, which is developed in C language) and clicked on disconnect client disconnects with server, server side displays 'connection closed by client' message and server waiting for client,it is fine. But in case of GUI closed without disconnecting server, server automatically closed and displays' Recv failure: Connection reset by peer' message and we have to restart server again. (This scenario happened when client resides in windows OS only, whereas if the client also runs on Linux this is not happened, instead of that it displays 'connection closed by client' message and server waiting for client as usual). Any one can help me, why this error came?

Thanking you friends.
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried using a WindowListener#windowClosing to disconnect if connected?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!