未验证 提交 3d13dae7 编写于 作者: H Hoolefu 提交者: GitHub

[ISSUE#728]check ChannelHandlerContext whether is null

[ISSUE#728]check ChannelHandlerContext whether is null
上级 bca05f7b
...@@ -384,10 +384,12 @@ public class DefaultRequestProcessor extends AsyncNettyRequestProcessor implemen ...@@ -384,10 +384,12 @@ public class DefaultRequestProcessor extends AsyncNettyRequestProcessor implemen
int wipeTopicCnt = this.namesrvController.getRouteInfoManager().wipeWritePermOfBrokerByLock(requestHeader.getBrokerName()); int wipeTopicCnt = this.namesrvController.getRouteInfoManager().wipeWritePermOfBrokerByLock(requestHeader.getBrokerName());
log.info("wipe write perm of broker[{}], client: {}, {}", if (ctx != null) {
requestHeader.getBrokerName(), log.info("wipe write perm of broker[{}], client: {}, {}",
RemotingHelper.parseChannelRemoteAddr(ctx.channel()), requestHeader.getBrokerName(),
wipeTopicCnt); RemotingHelper.parseChannelRemoteAddr(ctx.channel()),
wipeTopicCnt);
}
responseHeader.setWipeTopicCount(wipeTopicCnt); responseHeader.setWipeTopicCount(wipeTopicCnt);
response.setCode(ResponseCode.SUCCESS); response.setCode(ResponseCode.SUCCESS);
...@@ -502,7 +504,9 @@ public class DefaultRequestProcessor extends AsyncNettyRequestProcessor implemen ...@@ -502,7 +504,9 @@ public class DefaultRequestProcessor extends AsyncNettyRequestProcessor implemen
} }
private RemotingCommand updateConfig(ChannelHandlerContext ctx, RemotingCommand request) { private RemotingCommand updateConfig(ChannelHandlerContext ctx, RemotingCommand request) {
log.info("updateConfig called by {}", RemotingHelper.parseChannelRemoteAddr(ctx.channel())); if (ctx != null) {
log.info("updateConfig called by {}", RemotingHelper.parseChannelRemoteAddr(ctx.channel()));
}
final RemotingCommand response = RemotingCommand.createResponseCommand(null); final RemotingCommand response = RemotingCommand.createResponseCommand(null);
...@@ -518,13 +522,6 @@ public class DefaultRequestProcessor extends AsyncNettyRequestProcessor implemen ...@@ -518,13 +522,6 @@ public class DefaultRequestProcessor extends AsyncNettyRequestProcessor implemen
return response; return response;
} }
if (bodyStr == null) {
log.error("updateConfig get null body!");
response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark("string2Properties error");
return response;
}
Properties properties = MixAll.string2Properties(bodyStr); Properties properties = MixAll.string2Properties(bodyStr);
if (properties == null) { if (properties == null) {
log.error("updateConfig MixAll.string2Properties error {}", bodyStr); log.error("updateConfig MixAll.string2Properties error {}", bodyStr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册