private async Task RunMiddleware() { try { await _connectionDelegate(this).ConfigureAwait(false); } catch (Exception ex) { // If we failed to initialize, bubble that exception to the caller. // If we've already initialized then this will noop Initialized.TrySetException(ex); } }