-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clientv3: Allow watcher to close channels while waiting for new client
Once watchGrpcStream.run() gets a connection error, it does not anything until it gets a new watch client, because newWatchClient() called in the main loop blocks. In this state, watch response channels returned by the Watcher won't be closed even if the cancel function of the context given to the Watcher has been called. The cancel request will be executed after a connection to the server has been re-established. This commit allow watcher to run cancel tasks while waiting for a new client so that users can cancel watch tasks anytime.
- Loading branch information
Showing
1 changed file
with
58 additions
and
42 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