Forums Register Login

Server gets crashed and throws IOException

+Pie Number of slices to send: Send
I have created very simple multi-threaded java socket chat program, and that works fine when they are chatting and new clients join to the program.But as soon as one client gets terminated or closed, the entire server fails with all other active clients in the chat. Could you guys give me an idea to solve this, please friends.


1
+Pie Number of slices to send: Send
 

Steiphan Jason wrote:I have created very simple multi-threaded java socket chat program, and that works fine when they are chatting and new clients join to the program.But as soon as one client gets terminated or closed, the entire server fails with all other active clients in the chat. Could you guys give me an idea to solve this, please friends.



The process of closing one client, includes terminating the buffered reader, which is wrapped around standard input. This means that when a client is closed, standard input is closed. And when standard input is closed, then you can't type anything for that client, or any of the other clients.

Henry
+Pie Number of slices to send: Send
Thank you so much Henry Wong! Now I solved the problem. Thank you
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 4705 times.
Similar Threads
Applet-Sockets(Plz help me out)
Client Applet- server application
Simple echo. Problem with connection to server.
What's wrong here!
Tomcat Server Running Status
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:51:24.