mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-02-04 13:51:23 +01:00
Add null check to channel close
This commit is contained in:
parent
762c66ff42
commit
886ac734f9
@ -20,7 +20,9 @@ public class ViaConnectionManager {
|
||||
connections.add(connection);
|
||||
clients.put(id, connection);
|
||||
|
||||
connection.getChannel().closeFuture().addListener((ChannelFutureListener) future -> onDisconnect(connection));
|
||||
if (connection.getChannel() != null) {
|
||||
connection.getChannel().closeFuture().addListener((ChannelFutureListener) future -> onDisconnect(connection));
|
||||
}
|
||||
}
|
||||
|
||||
public void onDisconnect(UserConnection connection) {
|
||||
|
Loading…
Reference in New Issue
Block a user