fixed to close socket while client and server stopping
This commit is contained in:
parent
63689f61e8
commit
1dcf9dec7a
@ -5,7 +5,7 @@ plugins {
|
||||
}
|
||||
|
||||
group 'me.bvn13'
|
||||
version '1.2.1'
|
||||
version '1.2.2'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -90,6 +90,11 @@ public class Client<T extends AbstractClientListener> {
|
||||
public void stop() {
|
||||
log.debug("Stopping client");
|
||||
client.stop();
|
||||
try {
|
||||
socket.close();
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to close socket");
|
||||
}
|
||||
executor.shutdown();
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,11 @@ public class Server<T extends AbstractClientListener> {
|
||||
client.stop();
|
||||
iterator.remove();
|
||||
}
|
||||
try {
|
||||
socket.close();
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to close socket");
|
||||
}
|
||||
executor.shutdown();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user