1
0
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:
Jkorf
2026-10-13 10:38:21 +02:00
parent 5135047097
commit c6647f6815
@@ -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;
} }