From 5a9dafe6f7ad0586a7a56aba44761083b2179a5d Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Mon, 28 Sep 2026 15:06:35 -0500 Subject: [PATCH] fix(world): send players to the new chat server again on the next connect A world that still thinks it is connected when CHAT_SERVER_READY arrives sends its players at once; should that link be the retired chat server's, not yet noticed as gone, they are sent again once the world reconnects. Co-Authored-By: Claude Opus 5.5 --- dWorldServer/WorldServer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dWorldServer/WorldServer.cpp b/dWorldServer/WorldServer.cpp index ca1dcfd4c..adff4f93d 100644 --- a/dWorldServer/WorldServer.cpp +++ b/dWorldServer/WorldServer.cpp @@ -170,12 +170,14 @@ void ResendPlayersToChat() { // CHAT_SERVER_READY (live update): connect to the new chat server now rather than at the next retry void OnChatServerReady() { - g_ChatResyncPending = true; if (g_ChatConnected) { - g_ChatResyncPending = false; + // Already connected to the new one; should that be the old one's link and not noticed yet, the players go + // again once connected (a resync changes nothing for players the chat server has) ResendPlayersToChat(); + g_ChatResyncPending = true; return; } + g_ChatResyncPending = true; LOG("A new chat server is up; connecting"); Game::chatServer->Connect(g_ChatIP.c_str(), g_ChatPort, NET_PASSWORD_EXTERNAL, strnlen(NET_PASSWORD_EXTERNAL, sizeof(NET_PASSWORD_EXTERNAL))); }