Skip to content

Commit

Permalink
Reuse the same cookie until it expires
Browse files Browse the repository at this point in the history
This fixes and issue where the client retries and fails because the cookie has been changed.
  • Loading branch information
SupremeMortal committed Jul 24, 2024
1 parent ced5eee commit baf053b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void onOpenConnectionRequest1(ChannelHandlerContext ctx, DatagramPacket
cookie = 0;
}

PendingConnection connection = this.pendingConnections.put(sender, new PendingConnection(protocolVersion, cookie));
PendingConnection connection = this.pendingConnections.putIfAbsent(sender, new PendingConnection(protocolVersion, cookie));
if (connection != null && log.isTraceEnabled()) {
log.trace("Received duplicate open connection request 1 from {}", sender);
}
Expand Down

0 comments on commit baf053b

Please sign in to comment.