Skip to content

Commit 58be507

Browse files
author
Sandy W
committed
added message for Connection Refused
1 parent 106b6a1 commit 58be507

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/ClientThread.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ public void run() {
8484
System.err.println("Unknown host: " + hostName);
8585
System.exit(1);
8686
}
87+
catch (ConnectException e) {
88+
System.err.println("Connection refused by host: " + hostName);
89+
System.exit(1);
90+
}
8791
catch (IOException e) {
8892
e.printStackTrace();
8993
}

0 commit comments

Comments
 (0)