Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed panic with signals #707

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Fixed panic with signals #707

merged 4 commits into from
Jun 26, 2024

Conversation

Zhaars
Copy link
Contributor

@Zhaars Zhaars commented Jun 25, 2024

There is a panic with closing closed channels come from functions StopListeners and Exit. It happens because signals are processed asynchronously and corresponded function can be called several times which triggers the panic. As a solution was used sync.Once to make it callable only once.

Checklist

@Zhaars Zhaars requested a review from Lagovas June 25, 2024 13:55
@Lagovas Lagovas requested a review from G1gg1L3s June 26, 2024 13:43
Copy link
Collaborator

@Lagovas Lagovas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Zhaars Zhaars merged commit 02ebae0 into master Jun 26, 2024
11 checks passed
@Zhaars Zhaars deleted the zhars/fixed_panic_with_signals branch September 12, 2024 17:10
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.

2 participants