From 18400eb14b49b0f675e3b15e7d6f6b7541a20fd2 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Wed, 7 Feb 2024 00:49:32 +0100 Subject: [PATCH] fehlendes if-statement --- src/main/java/ChatServer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); - } + }} }