Archived
0

Zond:fix: разорвать соединение после неудачного handshake

This commit is contained in:
2017-06-17 13:48:15 +03:00
parent e10ec527ad
commit 14b3f46b50

View File

@@ -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");