diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index 70929e7..33d2860 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -25,6 +25,13 @@ public class ChatServer { } } catch (IOException e) { e.printStackTrace(); + } finally { + try { + serverSocket.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } }