1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-08 00:16:27 +00:00

Fixed socket getting disconnected when no data timeout reached instead of being reconnected

This commit is contained in:
JKorf 2022-07-19 19:12:26 +02:00
parent 9f0654815d
commit 5bcf50fb4d

View File

@ -660,7 +660,7 @@ namespace CryptoExchange.Net.Sockets
if (DateTime.UtcNow - LastActionTime > Parameters.Timeout)
{
_log.Write(LogLevel.Warning, $"Socket {Id} No data received for {Parameters.Timeout}, reconnecting socket");
_ = CloseAsync().ConfigureAwait(false);
_ = ReconnectAsync().ConfigureAwait(false);
return;
}
try