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

fix mutex unlock error on callback panic (#49) #55

Merged
merged 1 commit into from
May 14, 2020

Conversation

nbaztec
Copy link
Contributor

@nbaztec nbaztec commented May 9, 2020

This is a bugfix for #49

The code would try to exit following a panic in a callback and would rightly attempt to RUnlock the mutex since it's on the defer stack, however, the matching RLock call never gets called.

The fix puts the matching RLock call also on the defer stack in the event that a panic occurs.

Copy link
Member

@maxekman maxekman left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing the issue.

@maxekman maxekman merged commit 86c5e2b into looplab:master May 14, 2020
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