diff --git a/src/main/java/cn/apisium/uniporter/Decoder.java b/src/main/java/cn/apisium/uniporter/Decoder.java index 7ce5fa4..4c592e1 100644 --- a/src/main/java/cn/apisium/uniporter/Decoder.java +++ b/src/main/java/cn/apisium/uniporter/Decoder.java @@ -79,7 +79,11 @@ public static void clearHandler(ChannelHandlerContext context) { names.addAll(original); // Keep the tail handler names.remove(Constants.DEFAULT_TAIL_ID); - names.forEach(context.channel().pipeline()::remove); + try { + names.forEach(context.channel().pipeline()::remove); + } catch (Throwable e) { + // Ignored for known possible throwable might occur here. + } } catch (Throwable e) { e.printStackTrace(); }