1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-22 05:42:53 +00:00
This commit is contained in:
JKorf
2026-05-25 12:55:21 +02:00
parent 7853834286
commit 562d1d76c1
2 changed files with 5 additions and 5 deletions
@@ -383,8 +383,6 @@ namespace CryptoExchange.Net.Clients
released = true; released = true;
} }
var needsConnecting = !socketConnection.Connected;
var connectResult = await ConnectIfNeededAsync(socketConnection, false, ct).ConfigureAwait(false); var connectResult = await ConnectIfNeededAsync(socketConnection, false, ct).ConfigureAwait(false);
if (!connectResult) if (!connectResult)
return new CallResult<HighPerfUpdateSubscription>(connectResult.Error!); return new CallResult<HighPerfUpdateSubscription>(connectResult.Error!);
@@ -15,6 +15,9 @@ using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
#pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
#pragma warning disable IL3050 // Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.
namespace CryptoExchange.Net.Testing namespace CryptoExchange.Net.Testing
{ {
/// <summary> /// <summary>
@@ -131,7 +134,6 @@ namespace CryptoExchange.Net.Testing
var expectedBodyParamsJson = bodyParamsLine.Substring(12); var expectedBodyParamsJson = bodyParamsLine.Substring(12);
expectedBodyParams = JsonSerializer.Deserialize<Dictionary<string, object>>(expectedBodyParamsJson)!; expectedBodyParams = JsonSerializer.Deserialize<Dictionary<string, object>>(expectedBodyParamsJson)!;
} }
TestHelpers.ConfigureRestClient(_client, response, System.Net.HttpStatusCode.OK); TestHelpers.ConfigureRestClient(_client, response, System.Net.HttpStatusCode.OK);
var result = await methodInvoke(_client).ConfigureAwait(false); var result = await methodInvoke(_client).ConfigureAwait(false);
@@ -161,9 +163,9 @@ namespace CryptoExchange.Net.Testing
{ {
// Validate request body // Validate request body
Dictionary<string, object> bodyParameters; Dictionary<string, object> bodyParameters;
if (result.RequestBody.StartsWith("{") || result.RequestBody.StartsWith("[")) if (result.RequestBody!.StartsWith("{") || result.RequestBody.StartsWith("["))
{ {
bodyParameters = JsonSerializer.Deserialize<Dictionary<string, object>>(result.RequestBody!); bodyParameters = JsonSerializer.Deserialize<Dictionary<string, object>>(result.RequestBody!)!;
} }
else else
{ {