Skip to content

Commit

Permalink
Account for OperationCanceledException
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Sep 26, 2021
1 parent 16b8115 commit 3d1a3c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion osu.Game.Rulesets.Sentakki/IO/GameplayEventBroadcaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ private async void attemptConnection()
isWaitingForClient = true;

try { await pipeServer.WaitForConnectionAsync(cancellationToken).ConfigureAwait(false); }
catch (TaskCanceledException) { return; }
catch (Exception e)
{
// The operation was canceled. Gracefully shutdown;
if (e is TaskCanceledException || e is OperationCanceledException)
return;

throw;
}

isWaitingForClient = false;

Expand Down

0 comments on commit 3d1a3c0

Please sign in to comment.