Skip to content

Commit

Permalink
[修改]1. 修改消息容器锁状态
Browse files Browse the repository at this point in the history
  • Loading branch information
StarryGames authored and StarryGames committed Aug 10, 2024
1 parent b32f155 commit a5b6064
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Runtime/Network/Network/NetworkManager.NetworkChannelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,13 @@ public virtual void Update(float elapseSeconds, float realElapseSeconds)

ProcessHeartBeat(realElapseSeconds);
PRpcState.Update(elapseSeconds, realElapseSeconds);

while (m_ExecutionQueue.Count > 0)
lock (m_ExecutionQueue)
{
m_ExecutionQueue.Dequeue()?.Invoke();
}
while (m_ExecutionQueue.Count > 0)
{
m_ExecutionQueue.Dequeue()?.Invoke();
}
}
}

/// <summary>
Expand Down

0 comments on commit a5b6064

Please sign in to comment.