mojira.dev
MC-306471

Client incorrectly falls back to port 25565 after network change when SRV record points to non-default port (1.21.11)

Short description of the issue
After switching the computer's network connection, the Minecraft client fails to connect to servers that use SRV records with a non-standard port (e.g., 8006). It incorrectly attempts to connect to port 25565 instead. Restarting the client temporarily fixes the issue, but it recurs when the network is changed again without restarting.

Steps to reproduce the issue

Use Minecraft version 1.21.11.

Open the multiplayer server list and add a server address that relies on an SRV record with a non-default port, for example test.mcyd.top (which actually uses SRV and port 8006 – adjust to any test server you have). Observe that the server's MOTD displays correctly initially.

Without closing the client, change the computer's network connection (e.g., switch from Wi-Fi to a mobile hotspot, or disconnect and reconnect to a different network).

Return to Minecraft and refresh the server list (or click on the server entry).

Notice the connection status.

Expected result
The server list should still show the correct MOTD and allow connection using the SRV-specified port (e.g., 8006).

Actual result
The client fails to connect to the server; it attempts to connect to port 25565 instead of the correct port. This behavior persists until the Minecraft client is completely restarted. After restart, the server works again until another network change occurs.

Environment:

OS: Windows 11

The issue occurs regardless of the specific network type

Environment

Windows11

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media]

I have tested servers 2b2t.org refreshing the server list after changing the computer network makes it impossible to link to the server

VOLLEY

(Unassigned)

Unconfirmed

(Unassigned)

1.21.11

Retrieved