diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index 33d2860..84d84af 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -26,11 +26,12 @@ public class ChatServer { } catch (IOException e) { e.printStackTrace(); } finally { + if (serverSocket != null) { try { serverSocket.close(); } catch (IOException e) { e.printStackTrace(); - } + }} }