Skip to content

Commit

Permalink
fix: non ready connections should not observe objects
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach committed Apr 15, 2019
1 parent e69c097 commit 1352334
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/Mirror/Runtime/NetworkIdentity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,10 @@ public void RebuildObservers(bool initialize)

if (changed)
{
observers = newObservers.ToDictionary(conn => conn.connectionId, conn => conn);
observers =
newObservers.
Where(conn => conn.isReady).
ToDictionary(conn => conn.connectionId, conn => conn);
}
}

Expand Down

0 comments on commit 1352334

Please sign in to comment.