-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix consumer might not subscribe after a reconnection (#438)
Fixes #436 ### Motivation When a consumer starts grabbing the connection, it registers a timer after the operation timeout. When that timer is expired, it will fail the connection and cancel the connection timer. However, it results a race condition that: 1. The consumer's connection is closed (e.g. the keep alive timer failed) 2. The connection timer is registered on the executor and will trigger the reconnection after 100ms 3. The connection timer is cancelled, then the reconnection won't start. ### Modifications Cancel the `creationTimer_` once `HandlerBase#start` succeeded first time. Add `testReconnectWhenFirstConnectTimedOut` to cover this case.
- Loading branch information
1 parent
2a69168
commit 5940cb5
Showing
5 changed files
with
75 additions
and
6 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
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