fix noncritical altcontrol exception
This commit is contained in:
parent
61b073ef95
commit
85984c7088
1 changed files with 12 additions and 5 deletions
|
@ -51,6 +51,18 @@ public class RemoteEventManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void end() {
|
public void end() {
|
||||||
|
ServerSocket server = this.server;
|
||||||
|
Socket head = this.head;
|
||||||
|
clients.clear();
|
||||||
|
id = -1;
|
||||||
|
peers = 0;
|
||||||
|
this.server = null;
|
||||||
|
this.head = null;
|
||||||
|
try {
|
||||||
|
Thread.sleep(50);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if(server != null) {
|
if(server != null) {
|
||||||
server.close();
|
server.close();
|
||||||
|
@ -59,11 +71,6 @@ public class RemoteEventManager {
|
||||||
head.close();
|
head.close();
|
||||||
}
|
}
|
||||||
} catch (IOException ignored) {}
|
} catch (IOException ignored) {}
|
||||||
clients.clear();
|
|
||||||
id = -1;
|
|
||||||
peers = 0;
|
|
||||||
server = null;
|
|
||||||
head = null;
|
|
||||||
BaseBand.ifFeatureEnabled(AltControl.class, f -> f.setEnabled(false));
|
BaseBand.ifFeatureEnabled(AltControl.class, f -> f.setEnabled(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue