Guard main thread packet handling
This commit is contained in:
parent
1f5b6aea97
commit
d444e01b37
|
@ -33,7 +33,14 @@ public class PacketThreadUtilMixin {
|
|||
return;
|
||||
}
|
||||
if (processor.getConnection().isConnected()) {
|
||||
try {
|
||||
packetIn.handle(processor);
|
||||
} catch (Exception exception) {
|
||||
if (processor.shouldPropagateHandlingExceptions()) {
|
||||
throw exception;
|
||||
}
|
||||
LOGGER.error("Failed to handle packet {}, suppressing error", packetIn, exception);
|
||||
}
|
||||
} else {
|
||||
LOGGER.debug("Ignoring packet due to disconnection: " + packetIn);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user