mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-16 08:01:06 +00:00
Fixed DelayAfterConnect applying on failed connection attemps on HighPerf connections
This commit is contained in:
@@ -198,8 +198,13 @@ namespace CryptoExchange.Net.Sockets.HighPerf
|
|||||||
{
|
{
|
||||||
var result = await _socket.ConnectAsync(ct).ConfigureAwait(false);
|
var result = await _socket.ConnectAsync(ct).ConfigureAwait(false);
|
||||||
if (result.Success)
|
if (result.Success)
|
||||||
|
{
|
||||||
_processTask = ProcessAsync(_cts.Token);
|
_processTask = ProcessAsync(_cts.Token);
|
||||||
|
|
||||||
|
if ((ApiClient.ApiOptions.DelayAfterConnect ?? ApiClient.ClientOptions.DelayAfterConnect) != TimeSpan.Zero)
|
||||||
|
await Task.Delay(ApiClient.ApiOptions.DelayAfterConnect ?? ApiClient.ClientOptions.DelayAfterConnect).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user