Catch socket exception for code clarity even though I dont think it was causing any problems

This commit is contained in:
Manevolent
2018-08-13 09:58:55 -04:00
parent ca869089cf
commit f041820020
2 changed files with 4 additions and 10 deletions
@@ -163,6 +163,8 @@ public class LocalTeamspeakClientSocket
try { try {
socket.receive(packet); socket.receive(packet);
} catch (SocketTimeoutException ex) {
throw ex;
} catch (SocketException ex) { } catch (SocketException ex) {
if (socket.isClosed()) throw new EOFException(); if (socket.isClosed()) throw new EOFException();
else throw ex; else throw ex;
@@ -27,8 +27,7 @@ public class ServerConnectionTest {
); );
identity.improveSecurity(10); identity.improveSecurity(10);
while (true) {
try {
client.setIdentity(identity); client.setIdentity(identity);
client.setNickname("Hello from Java"); client.setNickname("Hello from Java");
@@ -152,14 +151,7 @@ public class ServerConnectionTest {
client.listClients(); client.listClients();
Thread.sleep(1000L); Thread.sleep(10000L);
client.listClients();
client.disconnect();
} catch (Throwable ex) {
ex.printStackTrace();
}
}
} }
} }