Skip to content

Commit

Permalink
cannotReconnect returns false when the watcher is auto-reconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Apr 21, 2021
1 parent 3ae2b55 commit a810d42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void schedule(Runnable command, long delay, TimeUnit timeUnit) {
}

final boolean cannotReconnect() {
return currentReconnectAttempt.get() >= reconnectLimit && reconnectLimit >= 0;
return !watcher.reconnecting() && currentReconnectAttempt.get() >= reconnectLimit && reconnectLimit >= 0;
}

final long nextReconnectInterval() {
Expand Down

0 comments on commit a810d42

Please # to comment.