NetMarshalServer fix disconnect all bug.

This commit is contained in:
Captain ALM 2023-05-20 22:49:51 +01:00
parent ae73866bf1
commit 1f48071c11
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -367,11 +367,10 @@ public class NetMarshalServer implements Closeable {
} }
private void disconnectAllInternal() throws IOException { private void disconnectAllInternal() throws IOException {
synchronized (slocksock) { NetMarshalClient[] clients = getConnectedClients();
for (NetMarshalClient c : clients) for (NetMarshalClient c : clients)
if (c.isRunning()) c.close(); if (c.isRunning()) c.close();
} }
}
protected NetMarshalClient generateClientSocket(Socket socketIn) { protected NetMarshalClient generateClientSocket(Socket socketIn) {
return new NetMarshalClient(socketIn, factory, loader, fragmentationOptions); return new NetMarshalClient(socketIn, factory, loader, fragmentationOptions);