Skip to content

Commit b083a13

Browse files
committed
fix potentioal cancellation exception
1 parent 156fbc0 commit b083a13

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ShockOsc/Services/ShockOsc.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ private async Task SetupVrcClient((OscQueryServer, IPEndPoint)? client)
125125
{
126126
// Stop existing loops
127127
await _loopCts.CancelAsync();
128-
await Task.WhenAll(_loopTasks);
128+
try { await Task.WhenAll(_loopTasks); }
129+
catch (OperationCanceledException) { }
129130
_loopCts.Dispose();
130131
_loopCts = new CancellationTokenSource();
131132

0 commit comments

Comments
 (0)