You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/10/26 06:23:00 UTC
[GitHub] [dubbo] guohao commented on a change in pull request #9122: [3.0] Fix onResetRead NPE
guohao commented on a change in pull request #9122:
URL: https://github.com/apache/dubbo/pull/9122#discussion_r736187369
##########
File path: dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleHttp2FrameServerHandler.java
##########
@@ -83,8 +83,10 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc
public void onResetRead(ChannelHandlerContext ctx, Http2ResetFrame frame) {
final AbstractServerStream serverStream = ctx.channel().attr(TripleConstant.SERVER_STREAM_KEY).get();
LOGGER.warn("Triple Server received remote reset errorCode=" + frame.errorCode());
- serverStream.cancelByRemote();
- ctx.close();
+ if (serverStream != null) {
+ serverStream.cancelByRemote();
+ ctx.close();
Review comment:
`ctx.close` should be called even if the stream is `null`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org