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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user