diff --git a/.global.editorconfig.ini b/.global.editorconfig.ini index 47961da7c6..22d2f09999 100644 --- a/.global.editorconfig.ini +++ b/.global.editorconfig.ini @@ -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 diff --git a/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs b/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs index c35b8cc52b..65c774dffc 100644 --- a/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs +++ b/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs @@ -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 } /// calls