-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reconsiderOrphans was accessing pool state without the pool mutex held, which results in data races. To resolve this, some refactoring is necessary. reconsiderOrphans calls acceptKE, which did acquire the mutex, so that needs to be hoisted out. In this commit, the pre-mutex-acquire sanity checks for PR and KE messages in acceptPR and acceptKE are moved to separate checkAccept{PR,KE} functions for the caller, who then becomes responsible for acquiring the mutex. After acceptPR/acceptKE return, reconsiderOrphans is then called with the mutex still held. This is a backport candidate for 2.0.1.
- Loading branch information
Showing
1 changed file
with
36 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters