Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-270609

Client requires a tick between StoreCookiePacket and TransferPacket for cookie to be stored

XMLWordPrintable

    • Plausible
    • Networking
    • Important
    • Platform

      This issue is derived from resolution of MC-267934. Here, handling of StoreCookiePacket was moved on client tick.

      So doing similar thing as in code example below, the client will reconnect to the target server without the provided cookie, if StoreCookiePacket was sent just before TransferPacket.

      this.connection.send(new ClientboundStoreCookiePacket(signatureKey, signatureBytes));
      this.connection.send(new ClientboundTransferPacket(target.getHost(), target.getPort()));

      The reason turns out to be very similar to the previous issue, with the only difference now that StoreCookiePacket isn't handled before TransferPacket because since the first is now scheduled for the next client tick, transfer closes the connection immediately. In other words, PacketUtils::ensureRunningOnSameThread cancels the StoreCookiePacket entirely because of a closed connection by TransferPacket.

            dinnerbone [Mojang] Nathan Adams
            DreenDex Alexander
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: