-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-3034] Fix bug in delivery client - recursive usage
The delivery client object encapsulates a delivery stream from the peer to the ordering service. It accepts a function in construction time that is invoked upon each successful (re)connection to the ordering service. The purpose of this design, is to make the peer send a SeekInfo message to the orderer, if it disconnects (or, if the orderer crashes and the peer connects to a new orderer). This function may also use the client *itself*. This commit fixes a bug that prevented the usage of the client in the function, because the connection reference and the stream reference were updated only after a successful invocation of the function, and thus- caused recursive reconnection attempts. It also contains a test case for this scenario, which spawns a gRPC server that emulates the ordering service. The ordering service emulation will be used in the next change set to test complex test cases of the delivery client itself Signed-off-by: Yacov Manevich <yacovm@il.ibm.com> Change-Id: I64e2985c227f0f052399e25a047a5984fdb1ba0b
- Loading branch information
Showing
3 changed files
with
189 additions
and
23 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
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
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