Zond:fix: разорвать соединение после неудачного handshake
This commit is contained in:
@@ -66,6 +66,7 @@ public class ClientPacketHandler extends ChannelInboundHandlerAdapter implements
|
|||||||
if (packet.getErrorCode() != 0) {
|
if (packet.getErrorCode() != 0) {
|
||||||
Shell.getInstance().getOutput()
|
Shell.getInstance().getOutput()
|
||||||
.println(String.format("Handshake: #%d %s", packet.getErrorCode(), packet.getMessage()));
|
.println(String.format("Handshake: #%d %s", packet.getErrorCode(), packet.getMessage()));
|
||||||
|
Connector.getInstance().shutdown();
|
||||||
} else {
|
} else {
|
||||||
context.channel().attr(KNOWN_PACKETS).set(knownPackets);
|
context.channel().attr(KNOWN_PACKETS).set(knownPackets);
|
||||||
Shell.getInstance().getOutput().println("Handshake: OK");
|
Shell.getInstance().getOutput().println("Handshake: OK");
|
||||||
|
|||||||
Reference in New Issue
Block a user