mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-09 17:06:19 +00:00
Merge pull request #97 from hkooiker/master
Fix disconnectTime in InvokeConnectionRestored
This commit is contained in:
commit
b708ad3a1f
@ -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