From 848770d030275eedf1b4b28a9bbe40a14353646e Mon Sep 17 00:00:00 2001 From: Alena Bandarovich Date: Wed, 7 Feb 2024 19:22:35 +0100 Subject: [PATCH] Close reading messages from server --- src/main/java/ChatClient.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index ba31d5e..a42c3ca 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -66,6 +66,13 @@ public class ChatClient extends JFrame implements KeyListener { } catch (IOException e) { e.printStackTrace(); } + + try { + fromServerReader.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } }