Skip to content

Stop signal relay before closing channel - #23

Merged
mattn merged 1 commit into
masterfrom
fix-signal-close
Jul 10, 2026
Merged

Stop signal relay before closing channel#23
mattn merged 1 commit into
masterfrom
fix-signal-close

Conversation

@mattn

@mattn mattn commented Jul 10, 2026

Copy link
Copy Markdown
Owner

The signal channel was closed with defer close(sc) while it was still registered via signal.Notify. If a signal is delivered around shutdown, the runtime could send on the closed channel and panic.

Call signal.Stop before closing so no further sends can happen.

@mattn
mattn merged commit 9e67d44 into master Jul 10, 2026
2 checks passed
@mattn
mattn deleted the fix-signal-close branch July 10, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant