public void Close() { if (_connection != null) { _connection.Close(); } _stopExecutionThread = true; }
public void Close() { _stopping = true; lock (_connectionLock) { _connection.Close(); } _subscriptionsChannel.Close(); var items = _inProgress.Values; _inProgress.Clear(); foreach (var workItem in items) { workItem.Operation.Fail(new ConnectionClosingException( "Work item was still in progress at the moment of manual connection closing")); } _log.Info("EventStoreConnection closed."); }
public void Close(bool stopBackgroundThread = true) { lock (_subscriptionChannelLock) { if (_connection != null) { _connection.Close(); } _stopExecutionThread = stopBackgroundThread; } }