diff --git a/xchange-stream-service-netty/src/main/java/info/bitrich/xchangestream/service/netty/NettyStreamingService.java b/xchange-stream-service-netty/src/main/java/info/bitrich/xchangestream/service/netty/NettyStreamingService.java index e6d80fd59..9f328567d 100644 --- a/xchange-stream-service-netty/src/main/java/info/bitrich/xchangestream/service/netty/NettyStreamingService.java +++ b/xchange-stream-service-netty/src/main/java/info/bitrich/xchangestream/service/netty/NettyStreamingService.java @@ -408,12 +408,14 @@ protected String getChannel(T message) { protected void handleMessage(T message) { String channel = getChannel(message); - handleChannelMessage(channel, message); + if (channel != null) + handleChannelMessage(channel, message); } protected void handleError(T message, Throwable t) { String channel = getChannel(message); - handleChannelError(channel, t); + if (channel != null) + handleChannelError(channel, t); } protected void handleIdle(ChannelHandlerContext ctx) {