diff --git a/thunder-core/src/main/java/network/thunder/core/communication/layer/ProcessorHandler.java b/thunder-core/src/main/java/network/thunder/core/communication/layer/ProcessorHandler.java index 9437a79b..5021597c 100644 --- a/thunder-core/src/main/java/network/thunder/core/communication/layer/ProcessorHandler.java +++ b/thunder-core/src/main/java/network/thunder/core/communication/layer/ProcessorHandler.java @@ -3,7 +3,6 @@ import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; -import network.thunder.core.communication.processor.exceptions.LNException; public class ProcessorHandler extends ChannelDuplexHandler { @@ -49,14 +48,9 @@ public void channelRead (ChannelHandlerContext ctx, Object msg) throws Exception messageExecutor.sendMessageDownwards(message); } } - } catch (LNException e1) { - if (e1.shouldDisconnect()) { - ctx.close(); - } - throw e1; - } catch (Exception e) { - e.printStackTrace(); - throw e; + } catch (Exception e1) { + e1.printStackTrace(); + ctx.close(); } } @@ -79,7 +73,7 @@ public void write (ChannelHandlerContext ctx, Object msg, ChannelPromise promise } catch (Exception e) { e.printStackTrace(); - throw e; + ctx.close(); } }