Enable MA0040 and silence remaining case
"Flow the cancellation token"
This commit is contained in:
parent
a7e1c8fd09
commit
b818f5325a
|
@ -179,7 +179,7 @@ dotnet_diagnostic.MA0038.severity = silent
|
|||
# Do not write your own certificate validation method
|
||||
dotnet_diagnostic.MA0039.severity = error
|
||||
# Flow the cancellation token
|
||||
dotnet_diagnostic.MA0040.severity = silent
|
||||
dotnet_diagnostic.MA0040.severity = error
|
||||
# Make property static
|
||||
dotnet_diagnostic.MA0041.severity = silent
|
||||
# Do not use blocking calls in an async method
|
||||
|
|
|
@ -17,7 +17,9 @@ namespace BizHawk.Client.Common
|
|||
public ClientWebSocketWrapper(Uri uri, CancellationToken? cancellationToken = null)
|
||||
{
|
||||
_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
|
||||
}
|
||||
|
||||
/// <summary>calls <see cref="ClientWebSocket.CloseAsync"/></summary>
|
||||
|
|
Loading…
Reference in New Issue