Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection closed by the remote host  RSS feed

 
Eric Star
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!
My serversocketchannel and socketChannels are NON-blocking!
I don't know whether there is something I'm missing in java.nio package.I have implemented client -server program but my small problem is that when the client disconnects the server also dies.What do I need to close in order to prevent this(if there is any) on which side?
Thanx for your in advance!!
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing some code it's impossible to know. Off the top of my head, I'd say that you either don't have a loop to listen for clients or that you are getting an exception when the client closes and that kicks you out of your listen loop. Feel free to share small samples of relevant code so we can investigate further.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!