Skip to content

Commit

Permalink
fix: SendToAll sends to that exact connection if it is detected as lo…
Browse files Browse the repository at this point in the history
…cal connection, instead of falling back to the .localConnection field which might be something completely different.
  • Loading branch information
miwarnec committed Feb 25, 2020
1 parent 4267983 commit 4b90aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirror/Runtime/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public static bool SendToAll(int msgType, MessageBase msg, int channelId = Chann
{
// 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);
Expand Down

0 comments on commit 4b90aaf

Please sign in to comment.