Skip to content

Commit

Permalink
modify process message function
Browse files Browse the repository at this point in the history
  • Loading branch information
xxo1shine committed Oct 28, 2022
1 parent 58df2ed commit 44bcbd1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main/java/org/tron/p2p/connection/ChannelManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
@Slf4j(topic = "net")
public class ChannelManager {

private static byte tronHelloMessageType = 32;

private static byte tronDisconnectType = 33;

private static PeerServer peerServer;

@Getter
Expand Down Expand Up @@ -174,9 +170,6 @@ private static void handMessage(Channel channel, byte[] data) throws P2pExceptio
}

if (!channel.isFinishHandshake()) {
if (!channel.isFinishHandshake() && tronDisconnectType != data[0]) {
throw new P2pException(P2pException.TypeEnum.BAD_PROTOCOL, "type: " + data[0]);
}
channel.setFinishHandshake(true);
Parameter.handlerList.forEach(h -> h.onConnect(channel));
}
Expand Down

0 comments on commit 44bcbd1

Please sign in to comment.