Skip to content

Commit

Permalink
fix: Ensure socket is running when polling
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoTenPvP committed Mar 22, 2023
1 parent 522c2ff commit 68e82e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ruffles/Core/RuffleSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ private void EmptyPacketProcessingQueue()
/// <returns>The poll result.</returns>
public NetworkEvent Poll()
{
if (_userEventQueue.TryDequeue(out NetworkEvent @event))
if (IsRunning && _userEventQueue.TryDequeue(out NetworkEvent @event))
{
return @event;
}
Expand Down

0 comments on commit 68e82e7

Please sign in to comment.