Skip to content

Conversation

@hieblmi
Copy link
Collaborator

@hieblmi hieblmi commented Mar 20, 2025

Fixes race conditions in the static address withdrawal manager.

@hieblmi hieblmi marked this pull request as draft March 20, 2025 16:16
return ctx.Err()
}
}
m.mu.Unlock()
Copy link
Member

Choose a reason for hiding this comment

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

Unlock should also happen above where we return on ctx.Done()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

re-structured the code.

@hieblmi hieblmi force-pushed the fix-deadlock branch 2 times, most recently from c50edea to 7407a61 Compare March 21, 2025 08:05
@hieblmi hieblmi requested a review from starius March 21, 2025 08:46
@hieblmi hieblmi self-assigned this Mar 21, 2025
@hieblmi hieblmi marked this pull request as ready for review March 21, 2025 10:02
@hieblmi hieblmi requested a review from bhandras March 21, 2025 10:02
Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Collaborator

@starius starius left a comment

Choose a reason for hiding this comment

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

LGTM!
Added a nit.

}
}
}()
}(depoFsm)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this passing-as-an-argument needed? Previous version seems also ok.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

usually this pattern is better within loops, but I also find in more clear, so keeping it.

@hieblmi hieblmi merged commit cecb24c into lightninglabs:master Mar 21, 2025
4 checks passed
@hieblmi hieblmi deleted the fix-deadlock branch March 21, 2025 13:53
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.

3 participants