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

The handleDisconnection() method is called twice when players are forcibly removed from servers or attempt to connect servers that they're not allowed to join

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.18.1, 22w05a, 22w06a, 1.18.2 Pre-release 1, 1.18.2, 22w17a, 22w18a, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.21.4
    • None
    • Confirmed
    • Networking
    • Normal
    • Platform

      The Bug:

      The handleDisconnection() method is called twice when players are forcibly removed from servers (for example, having the "/kick" command used on them) or when they attempt to connect servers that they're not allowed to join (for example, attempting to connect to servers that they're banned from).

      The server console states that the handleDisconnection() method is called twice upon reproducing this bug.

      For example, when a player uses the "/kick" command on themselves, the following is printed into the server console:

      [17:17:17 INFO]: <Avoma> Hello
      [17:17:30 INFO]: Avoma lost connection: Kicked by an operator
      [17:17:30 INFO]: Avoma left the game
      [17:17:30 INFO]: [Avoma: Kicked Avoma: Kicked by an operator]
      [17:17:30 WARN]: handleDisconnection() called twice
      

      Steps to Reproduce:

      1. Start a server and ban yourself from it.
      2. Attempt to join the server and look at the server console.
      3. Take note as to whether or not the handleDisconnection() method is called twice when players are forcibly removed from servers or attempt to connect servers that they're not allowed to join.

      Observed Behavior:

      The handleDisconnection() method is called twice as indicated by the "handleDisconnection() called twice" warning that's logged in the server console.

      Expected Behavior:

      The handleDisconnection() method would not be called twice.

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            10 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: