Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
@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