Heimdall Gitea / Detect CI scope (push) Successful in 19s
Heimdall Gitea / Build and tests (push) Successful in 18m10s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 5m20s
Heimdall Gitea / Build and scan agent image (push) Successful in 9m26s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m19s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 16m17s
Heimdall Gitea / CI policy (push) Successful in 2s
Fixes blocking SignalR client shutdown; see issue #233. Co-authored-by: Arnaud Dartois <admin@tordais.cc>
1.9 KiB
1.9 KiB
name, description
| name | description |
|---|---|
| signalr-client-lifecycle | Avoid blocking SignalR client teardown in Heimdall Blazor components and services. |
Heimdall SignalR client lifecycle
NotificationsHubClient is scoped to a Blazor circuit and owns a HubConnection. Components that use it should implement IAsyncDisposable, unsubscribe their event handlers, then await Hub.DisposeAsync().
Implementation
- Do not call
.Wait(),.Result, orGetAwaiter().GetResult()on SignalR stop/dispose operations. Network shutdown can block a renderer or request thread. - Centralize teardown in one asynchronous helper. Atomically detach the owned connection before awaiting shutdown so repeated disposal cannot dispose it twice.
DisposeAsync()awaitsStopAsyncandDisposeAsync, handling shutdown failures independently so failed stop still attempts resource disposal.- If compatibility requires synchronous
IDisposable, it must return without blocking and start best-effort asynchronous cleanup. KeepGC.SuppressFinalize(this)on both dispose paths. - Log cleanup failures at debug level without access tokens, URLs containing credentials, or message payloads.
Acceptance
- Build
src/Heimdall.Web/Heimdall.Web.csprojwith the SDK pinned byglobal.json; do not suppress analyzer warnings for blocking calls. - Verify the component unsubscribes handlers and awaits async disposal.
- Run the disposable Central + PostgreSQL Compose recipe from
skills/compose-disposable-recipe/SKILL.mdwith unique generated credentials, ports, project, and image tag; check/healthzand verify cleanup of project resources and that exact tag. - Treat production GlitchTip recurrence as external evidence: local build and Compose do not prove the deployed client has stopped emitting events.
See Gitea issue #233 for the current incident evidence.