fix: SendToObservers 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:38 +01:00
parent a497803de0
commit 4267983139

View File

@ -239,7 +239,7 @@ static bool SendToObservers<T>(NetworkIdentity identity, T msg, int channelId =
{
// 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);