Catch socket exception for code clarity even though I dont think it was causing any problems
This commit is contained in:
+2
@@ -163,6 +163,8 @@ public class LocalTeamspeakClientSocket
|
||||
|
||||
try {
|
||||
socket.receive(packet);
|
||||
} catch (SocketTimeoutException ex) {
|
||||
throw ex;
|
||||
} catch (SocketException ex) {
|
||||
if (socket.isClosed()) throw new EOFException();
|
||||
else throw ex;
|
||||
|
||||
@@ -27,8 +27,7 @@ public class ServerConnectionTest {
|
||||
);
|
||||
|
||||
identity.improveSecurity(10);
|
||||
while (true) {
|
||||
try {
|
||||
|
||||
client.setIdentity(identity);
|
||||
|
||||
client.setNickname("Hello from Java");
|
||||
@@ -152,14 +151,7 @@ public class ServerConnectionTest {
|
||||
|
||||
client.listClients();
|
||||
|
||||
Thread.sleep(1000L);
|
||||
Thread.sleep(10000L);
|
||||
|
||||
client.listClients();
|
||||
|
||||
client.disconnect();
|
||||
} catch (Throwable ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user