Skip to content

Commit c018a7c

Browse files
lt-nameSupremeMortal
authored andcommitted
Fix RakSessionCodec#onTick() null pointer issue
1 parent 82d4f51 commit c018a7c

File tree

1 file changed

+4
-1
lines changed
  • transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/common

1 file changed

+4
-1
lines changed

transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/common/RakSessionCodec.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ private void onTick() {
425425
}
426426
}
427427
} finally {
428-
getMetrics().queuedPacketBytes(queuedBytes);
428+
RakChannelMetrics metrics = this.getMetrics();
429+
if (metrics != null) {
430+
metrics.queuedPacketBytes(queuedBytes);
431+
}
429432
}
430433
}
431434

0 commit comments

Comments
 (0)