Skip to content

Commit

Permalink
Merge pull request #898 from Hunterk95/patch-1
Browse files Browse the repository at this point in the history
fix npe in transport
  • Loading branch information
mrniko committed May 16, 2023
2 parents 14f6530 + 42ceb88 commit c5c9b5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
} else {
// first connection
ClientHead client = ctx.channel().attr(ClientHead.CLIENT).get();
handleMessage(req, client.getSessionId(), queryDecoder, ctx);
if (client != null) {
handleMessage(req, client.getSessionId(), queryDecoder, ctx);
}
}
} finally {
req.release();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
} else {
ClientHead client = ctx.channel().attr(ClientHead.CLIENT).get();
// first connection
handshake(ctx, client.getSessionId(), path, req);
if (client != null) {
handshake(ctx, client.getSessionId(), path, req);
}
}
} finally {
req.release();
Expand Down

0 comments on commit c5c9b5a

Please sign in to comment.