提交 60352b84 编写于 作者: N Nikita Koksharov

Fixed - error during channel initialization is not logged. #1566

上级 91e2cf96
......@@ -143,6 +143,17 @@ public class CommandDecoder extends ReplayingDecoder<State> {
sendNext(ctx);
throw e;
}
} else {
try {
while (in.writerIndex() > in.readerIndex()) {
decode(in, null, null, ctx.channel(), false);
}
sendNext(ctx);
} catch (Exception e) {
log.error("Unable to decode data. channel: {} message: {}", ctx.channel(), in.toString(0, in.writerIndex(), CharsetUtil.UTF_8), e);
sendNext(ctx);
throw e;
}
}
}
......@@ -335,7 +346,7 @@ public class CommandDecoder extends ReplayingDecoder<State> {
if (data != null) {
data.tryFailure(new RedisException(error + ". channel: " + channel + " command: " + LogHelper.toString(data)));
} else {
log.error("Error: {} channel: {} data: {}", error, channel, LogHelper.toString(data));
log.error("Error message from Redis: {} channel: {}", error, channel);
}
}
} finally {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册