mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 21:40:27 -07:00
Fix non-fatal NPE in networking code
This commit is contained in:
parent
bf497bae36
commit
b8ae0254c2
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ public class IoEventHandler {
|
||||||
ByteBuffer buffer = ByteBuffer.allocate(100_000);
|
ByteBuffer buffer = ByteBuffer.allocate(100_000);
|
||||||
IoSession session = (IoSession) key.attachment();
|
IoSession session = (IoSession) key.attachment();
|
||||||
if (channel.read(buffer) == -1) {
|
if (channel.read(buffer) == -1) {
|
||||||
if(session.getPlayer() != null){
|
if(session != null && session.getPlayer() != null){
|
||||||
Repository.getDisconnectionQueue().add(session.getPlayer());
|
Repository.getDisconnectionQueue().add(session.getPlayer());
|
||||||
}
|
}
|
||||||
key.cancel();
|
key.cancel();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue