diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index 84d84af..68eafeb 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -27,12 +27,13 @@ public class ChatServer { e.printStackTrace(); } finally { if (serverSocket != null) { - try { - serverSocket.close(); - } catch (IOException e) { - e.printStackTrace(); - }} - + try { + serverSocket.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } } @@ -40,9 +41,9 @@ public class ChatServer { public void broadcastMessage(String message) { System.out.println(message); if (message != null) { - for (ClientHandler client : clients) { - client.sendMessage(message); - } + for (ClientHandler client : clients) { + client.sendMessage(message); + } } }