Repository navigation
Tags
Tags
Guard late registration, bound stop hooks and make components idempotent Ignore Use/OnStart/OnStop once Run has started (with a logged warning) instead of mutating the slices Run reads without a lock, removing a documented but unguarded data race. Do not spawn a goroutine in stopBounded when the shutdown deadline is already spent: a stop hook or component that ignores its canceled context would otherwise leak a goroutine that outlives Run. Stop hooks are now skipped loudly once the deadline is exceeded rather than run against a dead context. Reject a second Start on the Worker and HTTPServer components instead of overwriting their internal state, so direct use cannot orphan the first goroutine or listener, and guard the HTTPServer lifecycle flags with a mutex so concurrent Start/Stop is not a data race. Add WithForceQuit to override the second-signal behavior (default os.Exit(130)), making last-resort cleanup possible and the path testable.