Fix last wrapped exception

Fixes #711
This commit is contained in:
Dan Mulloy 2019-12-14 16:54:18 -05:00
parent c893a3f11e
commit 6f8b2377b1
No known key found for this signature in database
GPG Key ID: 2B62F7DACFF133E8
1 changed files with 9 additions and 1 deletions

View File

@ -469,7 +469,15 @@ public class ChannelInjector extends ByteToMessageDecoder implements Injector {
} finally {
// Attempt to handle the packet nevertheless
if (packet != null) {
ENCODE_BUFFER.invoke(vanillaEncoder, ctx, packet, output);
try {
ENCODE_BUFFER.invoke(vanillaEncoder, ctx, packet, output);
} catch (InvocationTargetException ex) {
if (ex.getCause() instanceof Exception) {
//noinspection ThrowFromFinallyBlock
throw (Exception) ex.getCause();
}
}
finalEvent = event;
}
}