Skip to content

Commit

Permalink
添加异常检测日志
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeFJ committed Sep 28, 2023
1 parent 0b4f4e4 commit f707935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private boolean canHandle(SessionStatus sessionStatus, int cmd) throws Exception

@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
log.error("异常断开", cause.getMessage());
log.error("异常断开", cause);
TcpSession client = ctx.channel().attr(SESSION_KEY).get();
if (client != null) {
client.close(cause.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception {

@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
log.error("异常断开", cause.getMessage());
log.error("异常断开", cause);
TcpSession client = ctx.channel().attr(SESSION_KEY).get();
if (client != null) {
client.close(cause.getMessage());
Expand Down

0 comments on commit f707935

Please sign in to comment.