1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-10 09:26:22 +00:00

Added configureawaits

This commit is contained in:
JKorf 2018-12-06 09:50:41 +01:00
parent e41657d2e4
commit e5f712633e
2 changed files with 5 additions and 6 deletions

View File

@ -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)
{

View File

@ -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);
}
/// <summary>
@ -259,7 +259,7 @@ namespace CryptoExchange.Net
}
Task.WaitAll(tasks.ToArray());
});
}).ConfigureAwait(false);
}
public override void Dispose()