fix(adminui): picker DisposeAsync is fire-and-forget per design

This commit is contained in:
Joseph Doherty
2026-05-28 16:21:24 -04:00
parent e439100937
commit ef17d2e595
2 changed files with 8 additions and 4 deletions
@@ -189,11 +189,13 @@
private string TruncatedError() => private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError); _openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public async ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
if (_token != Guid.Empty) if (_token != Guid.Empty)
{ {
try { await BrowserService.CloseAsync(_token); } catch { /* circuit teardown */ } // Fire-and-forget — don't block circuit teardown on a slow remote.
_ = BrowserService.CloseAsync(_token);
} }
return ValueTask.CompletedTask;
} }
} }
@@ -112,11 +112,13 @@
private string TruncatedError() => private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError); _openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public async ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
if (_token != Guid.Empty) if (_token != Guid.Empty)
{ {
try { await BrowserService.CloseAsync(_token); } catch { /* circuit teardown */ } // Fire-and-forget — don't block circuit teardown on a slow remote.
_ = BrowserService.CloseAsync(_token);
} }
return ValueTask.CompletedTask;
} }
} }