1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-16 19:03:01 +00:00

Shared exchange functionality (#214)

This commit is contained in:
Jan Korf
2024-09-27 09:17:44 +02:00
committed by GitHub
parent 5d3de52da6
commit b8686d60b9
199 changed files with 7219 additions and 277 deletions
@@ -51,6 +51,11 @@ namespace CryptoExchange.Net.Sockets
/// </summary>
public event Action? ConnectionClosed;
/// <summary>
/// Failed to resubscribe all subscription on the reconnected socket
/// </summary>
public event Action<Error>? ResubscribingFailed;
/// <summary>
/// Connecting restored event
/// </summary>
@@ -334,7 +339,8 @@ namespace CryptoExchange.Net.Sockets
var reconnectSuccessful = await ProcessReconnectAsync().ConfigureAwait(false);
if (!reconnectSuccessful)
{
_logger.FailedReconnectProcessing(SocketId, reconnectSuccessful.Error?.ToString());
_logger.FailedReconnectProcessing(SocketId, reconnectSuccessful.Error!.ToString());
_ = Task.Run(() => ResubscribingFailed?.Invoke(reconnectSuccessful.Error));
_ = _socket.ReconnectAsync().ConfigureAwait(false);
}
else