private async Task OpenErrorAsync() { _connectionBuilder?.Disconnect(); if (_worker != null) { await _worker.CloseAsync().ConfigureAwait(false); _worker = null; } _connectionState = ConnectionState.Broken; }
private async Task OpenWithNoValidationAsync(CancellationToken cancellationToken) { // try and re-connect. await _connectionBuilder.ConnectAsync(this).ConfigureAwait(false); _worker = await _connectionBuilder.OpenAsync(ConnectionString, cancellationToken).ConfigureAwait(false); if (_worker != null) { // and open the database await _worker.OpenAsync().ConfigureAwait(false); } }