diff --git a/CryptoExchange.Net/RestClient.cs b/CryptoExchange.Net/RestClient.cs index e2ef483..79f97b4 100644 --- a/CryptoExchange.Net/RestClient.cs +++ b/CryptoExchange.Net/RestClient.cs @@ -13,7 +13,6 @@ using CryptoExchange.Net.Authentication; using CryptoExchange.Net.Interfaces; using CryptoExchange.Net.Logging; using CryptoExchange.Net.Objects; -using CryptoExchange.Net.RateLimiter; using CryptoExchange.Net.Requests; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -90,7 +89,7 @@ namespace CryptoExchange.Net PingReply reply; try { - reply = await ping.SendPingAsync(uri.Host); + reply = await ping.SendPingAsync(uri.Host).ConfigureAwait(false); } catch(PingException e) { diff --git a/CryptoExchange.Net/SocketClient.cs b/CryptoExchange.Net/SocketClient.cs index 358fb00..a40c67c 100644 --- a/CryptoExchange.Net/SocketClient.cs +++ b/CryptoExchange.Net/SocketClient.cs @@ -30,7 +30,7 @@ namespace CryptoExchange.Net protected const string DataHandlerName = "DataHandler"; protected const string AuthenticationHandlerName = "AuthenticationHandler"; protected const string SubscriptionHandlerName = "SubscriptionHandler"; - protected const string PingHandlerName = "SubscriptionHandler"; + protected const string PingHandlerName = "PingHandler"; protected const string DataEvent = "Data"; protected const string SubscriptionEvent = "Subscription"; @@ -121,7 +121,7 @@ namespace CryptoExchange.Net { socketSubscription.Socket.OnMessage += data => ProcessMessage(socketSubscription, data); - if (await socketSubscription.Socket.Connect()) + if (await socketSubscription.Socket.Connect().ConfigureAwait(false)) { lock (sockets) sockets.Add(socketSubscription); @@ -239,7 +239,7 @@ namespace CryptoExchange.Net public virtual async Task Unsubscribe(UpdateSubscription subscription) { log.Write(LogVerbosity.Info, $"Closing subscription {subscription.Id}"); - await subscription.Close(); + await subscription.Close().ConfigureAwait(false); } /// @@ -259,7 +259,7 @@ namespace CryptoExchange.Net } Task.WaitAll(tasks.ToArray()); - }); + }).ConfigureAwait(false); } public override void Dispose()