Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,21 @@ public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
}

private void onRetryAttempt(Channel channel) {
switch (this.state) {
case HANDSHAKE_1:
if (this.rakChannel.config().getOption(RakChannelOption.RAK_COMPATIBILITY_MODE)) {
if (this.state != RakOfflineState.HANDSHAKE_COMPLETED) {
this.sendOpenConnectionRequest1(channel);
this.connectionAttempts++;
break;
case HANDSHAKE_2:
this.sendOpenConnectionRequest2(channel);
break;
}
} else {
switch (this.state) {
case HANDSHAKE_1:
this.sendOpenConnectionRequest1(channel);
this.connectionAttempts++;
break;
case HANDSHAKE_2:
this.sendOpenConnectionRequest2(channel);
break;
}
}
}

Expand Down Expand Up @@ -158,6 +165,8 @@ private void onOpenConnectionReply1(ChannelHandlerContext ctx, ByteBuf buffer) {
if (security) {
this.cookie = buffer.readInt();
this.security = true;
} else {
this.security = false;
}
int mtu = buffer.readShort();

Expand Down