DashboardopencodeStopAndWait closed signal loop

StopAndWait closed signal loop

Category: gotcha
Confidence: 1.00
ID: 01a07f7d-8536-76f1-ac37-b00332643188
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 0OJYWmHUobcuQ4y8f
Created: 2026-09-08 05:28:47
Updated: 2026-09-08 05:28:47

Content

Trap: ignoring nil values from a systemd signal channel looks like harmless filtering, but a closed channel returns nil forever and creates a tight loop; a later context.Background() property query can then hang indefinitely. Fix: use the two-value receive to detect closure and apply explicit deadlines to every subscription, state query, session wait, shutdown, and orphan-cleanup operation.

Move to: