From 3d1a3c0f4b1d2f97225fcbbd69d4cdbc0c5ceedf Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sun, 26 Sep 2021 13:46:21 +0200 Subject: [PATCH] Account for OperationCanceledException --- .../IO/GameplayEventBroadcaster.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/IO/GameplayEventBroadcaster.cs b/osu.Game.Rulesets.Sentakki/IO/GameplayEventBroadcaster.cs index 50a76d89a..2a91b16ba 100644 --- a/osu.Game.Rulesets.Sentakki/IO/GameplayEventBroadcaster.cs +++ b/osu.Game.Rulesets.Sentakki/IO/GameplayEventBroadcaster.cs @@ -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;