Skip to content

Commit 28136df

Browse files
committed
fix null point excpetion
1 parent 8776f4c commit 28136df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/tron/common/overlay/server/HandshakeHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> ou
8080
}
8181

8282
final HelloMessage helloMessage = (HelloMessage) msg;
83-
channel.getNodeStatistics().p2pInHello.add();
8483

8584
if (helloMessage.getVersion() != Args.getInstance().getNodeP2pVersion()) {
8685
logger.info("version not support, you[{}] version[{}], my version[{}]",
@@ -95,6 +94,8 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> ou
9594
channel.sendHelloMessage(ctx);
9695
}
9796

97+
channel.getNodeStatistics().p2pInHello.add();
98+
9899
channel.publicHandshakeFinished(ctx, helloMessage);
99100

100101
ctx.pipeline().remove(this);

0 commit comments

Comments
 (0)