Skip to content

Conversation

HoustonPutman
Copy link
Contributor

https://issues.apache.org/jira/browse/CURATOR-720

Stop a retry loop if the client is stopped.

Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -399,6 +399,9 @@ void removeParentWatcher(Watcher watcher) {
public void internalBlockUntilConnectedOrTimedOut() throws InterruptedException {
long waitTimeMs = connectionTimeoutMs;
while (!state.isConnected() && (waitTimeMs > 0)) {
if (!started.get()) {
throw new IllegalStateException("Client is not started");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to this

This should cover both "not started" and "closed".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Client is not started or has been closed" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

@eolivelli eolivelli merged commit 72fd977 into apache:master Dec 12, 2024
10 checks passed
@eolivelli
Copy link
Contributor

committed

thank you @HoustonPutman

@HoustonPutman HoustonPutman deleted the retry-stop branch December 12, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants