fix noncritical altcontrol exception

This commit is contained in:
Daniella / Tove 2024-06-01 11:40:12 +02:00
parent 61b073ef95
commit 85984c7088
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -51,6 +51,18 @@ public class RemoteEventManager {
}
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 {
if(server != null) {
server.close();
@ -59,11 +71,6 @@ public class RemoteEventManager {
head.close();
}
} catch (IOException ignored) {}
clients.clear();
id = -1;
peers = 0;
server = null;
head = null;
BaseBand.ifFeatureEnabled(AltControl.class, f -> f.setEnabled(false));
}