Expected behavior
When calling retrieveCookie(NamespacedKey) twice, both futures should be completed and the client should not be kicked.
Currently
@Override
public void handleCookieResponse(ServerboundCookieResponsePacket packet) {
if (this.paperConnection().handleCookieResponse(packet)) return; // Paper
this.disconnect(DISCONNECT_UNEXPECTED_QUERY, io.papermc.paper.connection.DisconnectionReason.INVALID_COOKIE); // Paper - kick event cause
}
kicks the player.
Because the second retrieveCookie call overrides the first because its a map, then when both cookies arrive the last one is not handled
|
private final Map<Identifier, CookieFuture> requestedCookies = new ConcurrentHashMap<>(); |
Observed/Actual behavior
Kick for Component.translatable("multiplayer.disconnect.unexpected_query_response")
Steps/models to reproduce
retriving the same cookie twice directly
Plugin and Datapack List
Paper version
latest
Other
No response
Expected behavior
When calling retrieveCookie(NamespacedKey) twice, both futures should be completed and the client should not be kicked.
Currently
kicks the player.
Because the second retrieveCookie call overrides the first because its a map, then when both cookies arrive the last one is not handled
Paper/paper-server/src/main/java/io/papermc/paper/connection/ReadablePlayerCookieConnectionImpl.java
Line 19 in 37dc545
Observed/Actual behavior
Kick for Component.translatable("multiplayer.disconnect.unexpected_query_response")
Steps/models to reproduce
retriving the same cookie twice directly
Plugin and Datapack List
Paper version
latest
Other
No response