mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-09 08:56:13 +00:00
Fix disconnectTime in InvokeConnectionRestored
This commit is contained in:
parent
b1f64bc8b1
commit
075e98a3ed
@ -330,7 +330,7 @@ namespace CryptoExchange.Net.Sockets
|
||||
if (lostTriggered)
|
||||
{
|
||||
lostTriggered = false;
|
||||
InvokeConnectionRestored();
|
||||
InvokeConnectionRestored(time);
|
||||
}
|
||||
|
||||
break;
|
||||
@ -351,9 +351,9 @@ namespace CryptoExchange.Net.Sockets
|
||||
}
|
||||
}
|
||||
|
||||
private async void InvokeConnectionRestored()
|
||||
private async void InvokeConnectionRestored(DateTime? disconnectTime)
|
||||
{
|
||||
await Task.Run(() => ConnectionRestored?.Invoke(DisconnectTime.HasValue ? DateTime.UtcNow - DisconnectTime.Value : TimeSpan.FromSeconds(0))).ConfigureAwait(false);
|
||||
await Task.Run(() => ConnectionRestored?.Invoke(disconnectTime.HasValue ? DateTime.UtcNow - disconnectTime.Value : TimeSpan.FromSeconds(0))).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async Task<bool> ProcessReconnect()
|
||||
|
Loading…
x
Reference in New Issue
Block a user