@ -39,6 +39,20 @@ public class ClientHandler implements Runnable {
}
} catch (IOException e) {
e.printStackTrace();
} finally {
//chatServer.removeClient(this);
chatServer.broadcastMessage(name + " disconnected.");
if (fromClientReader != null) {
try {
fromClientReader.close();
} catch (IOException e){
if (toClientWriter != null) {
toClientWriter.close();