diff --git a/src/Splitio/Services/EventSource/EventSourceClient.cs b/src/Splitio/Services/EventSource/EventSourceClient.cs index 7a98db36..d1d36048 100644 --- a/src/Splitio/Services/EventSource/EventSourceClient.cs +++ b/src/Splitio/Services/EventSource/EventSourceClient.cs @@ -128,18 +128,17 @@ private async Task ConnectAsync() catch (Exception ex) { _log.Debug($"Error connecting to {_url}.", ex); - } - finally - { - _disconnectSignal.Signal(); - - _log.Debug("Finished Event Source client ConnectAsync."); if (!_statusManager.IsDestroyed()) { _log.Debug("Stream closed unexpectedly, proceeding to reconnect."); await _notificationManagerKeeper.HandleSseStatus(SSEClientStatusMessage.RETRYABLE_ERROR); } } + finally + { + _disconnectSignal.Signal(); + _log.Debug("Finished Event Source client ConnectAsync."); + } } private async Task ReadStreamAsync()