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.

This commit is contained in:
vis2k 2020-02-25 11:13:59 +01:00
parent 4267983139
commit 4b90aafe12

View File

@ -308,7 +308,7 @@ public static bool SendToAll<T>(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);