Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
peer-state-actions: fix races related to updating PeerState
A peer can be set to cold at anytime asynchronously, this means that the governor may ask us to promote or demote a peer that has just been set to cold (for example the peer reset the connection). This change makes sure that each time we're about to update to peer status to something other than PeerCold, that we first check to see if the peer is coold. If that is the case we fail with an exception.
- Loading branch information
Showing
1 changed file
with
85 additions
and
19 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