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 {
|
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user