Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-29 01:20:15 +01:00
Add null check to channel close
Dieser Commit ist enthalten in:
Ursprung
762c66ff42
Commit
886ac734f9
@ -20,8 +20,10 @@ public class ViaConnectionManager {
|
||||
connections.add(connection);
|
||||
clients.put(id, connection);
|
||||
|
||||
if (connection.getChannel() != null) {
|
||||
connection.getChannel().closeFuture().addListener((ChannelFutureListener) future -> onDisconnect(connection));
|
||||
}
|
||||
}
|
||||
|
||||
public void onDisconnect(UserConnection connection) {
|
||||
Objects.requireNonNull(connection, "connection is null!");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren