Skip to content

Commit 94633f0

Browse files
committed
add connect check before retry task
1 parent 35b34fe commit 94633f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/retry/AbstractRetryTask.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ public void run(Timeout timeout) throws Exception {
124124
logger.info(taskName + " : " + url);
125125
}
126126
try {
127+
if (!registry.isAvailable()) {
128+
throw new IllegalStateException("Registry is not available.");
129+
}
127130
doRetry(url, registry, timeout);
128131
} catch (Throwable t) { // Ignore all the exceptions and wait for the next retry
129132

0 commit comments

Comments
 (0)