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.