Fix suppressed warning in `ClientWebSocketWrapper` ctor

more like "human not smart enough to recognise this" amirite
This commit is contained in:
YoshiRulz 2024-09-22 15:20:48 +10:00
parent 760a5b5285
commit b173712a15
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 3 deletions

View File

@ -16,10 +16,9 @@ namespace BizHawk.Client.Common
public ClientWebSocketWrapper(Uri uri, CancellationToken? cancellationToken = null)
{
cancellationToken ??= CancellationToken.None;
_w = new ClientWebSocket();
#pragma warning disable MA0040 // Analyzer not smart enough to recognise this
_w.ConnectAsync(uri, cancellationToken ?? CancellationToken.None).Wait();
#pragma warning restore MA0040
_w.ConnectAsync(uri, cancellationToken.Value).Wait(cancellationToken.Value);
}
/// <summary>calls <see cref="ClientWebSocket.CloseAsync"/></summary>