From 564b6f42376230617748a0757e0f179d77161dbd Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 29 Jan 2023 19:08:32 +0900 Subject: [PATCH] fix: #2623 NetworkServer.SetClientReady returns if already ready. fixes clients spamming ReadyMessage to force observer rebuilds etc. [imer] --- Assets/Mirror/Core/NetworkServer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Mirror/Core/NetworkServer.cs b/Assets/Mirror/Core/NetworkServer.cs index 8784fa2d5..91e831f61 100644 --- a/Assets/Mirror/Core/NetworkServer.cs +++ b/Assets/Mirror/Core/NetworkServer.cs @@ -1034,6 +1034,11 @@ public static void SetClientReady(NetworkConnectionToClient conn) { // Debug.Log($"SetClientReadyInternal for conn:{conn}"); + // only if not already ready yet. + // prevents clients spamming ReadyMessage to force observer rebuilds. + // fixes: https://github.com/MirrorNetworking/Mirror/issues/2623 + if (conn.isReady) return; + // set ready conn.isReady = true;