Browse Source

Avoid closing fromServerReader in case of null

remotes/origin/feature/client/exchange-messages-between-client-server
Alena Bandarovich 11 months ago
parent
commit
64626610ca
  1. 2
      src/main/java/ChatClient.java

2
src/main/java/ChatClient.java

@ -69,11 +69,13 @@ public class ChatClient extends JFrame implements KeyListener {
} }
} }
if (null != fromServerReader) {
try { try {
fromServerReader.close(); fromServerReader.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
}
toServerWriter.close(); toServerWriter.close();

Loading…
Cancel
Save