From 4b90aafe12970e00949ee43b07b9edd5213745da Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 25 Feb 2020 11:13:59 +0100 Subject: [PATCH] fix: SendToAll sends to that exact connection if it is detected as local connection, instead of falling back to the .localConnection field which might be something completely different. --- Assets/Mirror/Runtime/NetworkServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index 73c526b11..aa1fca618 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -308,7 +308,7 @@ public static bool SendToAll(T msg, int channelId = Channels.DefaultReliable) { // use local connection directly because it doesn't send via transport if (kvp.Value is ULocalConnectionToClient) - result &= localConnection.Send(segment); + result &= kvp.Value.Send(segment); // gather all internet connections else connectionIdsCache.Add(kvp.Key);