This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent losing incoming messages during bootstrapping
The problem was during bootstrap, if we received the `NodeApproval` message followed immediately by some other message (say `Relocate`), then the `NodeApproval` would be processed and the bootstrap would complete, leaving the following message in the intermediary channel buffer never to be taken out of it and thus losing it. The fix is to remove the intermediary channel and replace it with a simple wrapper around the `ConnectionEvent` receiver. Thus changing a the "push/pull" model into a simple "pull" model. This way, a message is never retrieved from the channel if we are not ready to process it.
- Loading branch information
Showing
1 changed file
with
43 additions
and
47 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