Change retry times to forever (#12593)

This commit is contained in:
Albumen Kevin 2023-06-26 12:59:18 +08:00 committed by GitHub
parent 2c82cf7dfc
commit 680481ccdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -66,9 +66,9 @@ public interface Constants {
int DEFAULT_SESSION_TIMEOUT = 60 * 1000;
/**
* Default value for the times of retry: 3
* Default value for the times of retry: -1 (forever)
*/
int DEFAULT_REGISTRY_RETRY_TIMES = 3;
int DEFAULT_REGISTRY_RETRY_TIMES = -1;
int DEFAULT_REGISTRY_RECONNECT_PERIOD = 3 * 1000;

View File

@ -113,7 +113,7 @@ public abstract class AbstractRetryTask implements TimerTask {
// other thread cancel this timeout or stop the timer.
return;
}
if (times > retryTimes) {
if (retryTimes > 0 && times > retryTimes) {
// 1-13 - failed to execute the retrying task.
logger.warn(