Skip to content

Commit

Permalink
Fix client ConnectionRequestAccepted handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
SupremeMortal committed Dec 7, 2019
1 parent 539322e commit e795f21
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,14 @@ private void onOpenConnectionReply2(ByteBuf buffer) {
}

private void onConnectionRequestAccepted(ByteBuf buffer) {
InetSocketAddress address = NetworkUtils.readAddress(buffer);
int systemIndex = buffer.readUnsignedShort();
while (buffer.isReadable(16)) {
NetworkUtils.readAddress(buffer); // our address
buffer.readUnsignedShort(); // system index
final int required = (this.address.getAddress() instanceof Inet6Address ? IPV6_MESSAGE_SIZE : IPV4_MESSAGE_SIZE) + 16;
while (buffer.isReadable(required)) {
NetworkUtils.readAddress(buffer);
}
long pongTime = buffer.readLong();
buffer.readLong();

this.sendNewIncomingConnection(pongTime);

Expand Down

0 comments on commit e795f21

Please sign in to comment.