Skip to content

Commit bb9cd0d

Browse files
committed
Do not suspend auto reconnect on protected mode #2770
We now no longer suspend auto-reconnect when a connection encounters protected mode.
1 parent faffc7e commit bb9cd0d

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/main/java/io/lettuce/core/protocol/CommandHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,12 +884,12 @@ private void onProtectedMode(String message) {
884884

885885
endpoint.notifyException(exception);
886886

887+
stack.forEach(cmd -> cmd.completeExceptionally(exception));
888+
stack.clear();
889+
887890
if (channel != null) {
888891
channel.disconnect();
889892
}
890-
891-
stack.forEach(cmd -> cmd.completeExceptionally(exception));
892-
stack.clear();
893893
}
894894

895895
/**

src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,6 @@ public void notifyException(Throwable t) {
518518
if (t instanceof RedisConnectionException && RedisConnectionException.isProtectedMode(t.getMessage())) {
519519

520520
connectionError = t;
521-
522-
if (connectionWatchdog != null) {
523-
connectionWatchdog.setListenOnChannelInactive(false);
524-
connectionWatchdog.setReconnectSuspended(false);
525-
}
526-
527521
doExclusive(this::drainCommands).forEach(cmd -> cmd.completeExceptionally(t));
528522
}
529523

0 commit comments

Comments
 (0)