Skip to content

Commit

Permalink
* Use TrySetException because tcs may have already completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Apr 24, 2024
1 parent e84b414 commit eb5be9f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public ConfiguredTaskAwaitable<T>.ConfiguredTaskAwaiter GetAwaiter()

public virtual void HandleChannelShutdown(ShutdownEventArgs reason)
{
_tcs.SetException(new OperationInterruptedException(reason));
_tcs.TrySetException(new OperationInterruptedException(reason));
}

protected virtual void Dispose(bool disposing)
Expand Down

0 comments on commit eb5be9f

Please sign in to comment.