修复重试逻辑
This commit is contained in:
parent
62cd5e2016
commit
ef6c164c0f
@ -80,7 +80,7 @@ public class WvpService {
|
||||
.withWaitStrategy(WaitStrategies.fixedWait(DEFAULT_RETRY_WAIT_TIME, TimeUnit.SECONDS))
|
||||
// 重试次数
|
||||
.withStopStrategy(StopStrategies.stopAfterAttempt(DEFAULT_RETRY_TIME))
|
||||
.retryIfResult(result -> result != null && (result.getCode() != 0 || result.getCode() != 200))
|
||||
.retryIfResult(result -> result == null || (result.getCode() != 0 && result.getCode() != 200))
|
||||
.withRetryListener(defaultRetryListener(name))
|
||||
.build();
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class WvpService {
|
||||
.withWaitStrategy(WaitStrategies.fixedWait(DEFAULT_RETRY_WAIT_TIME, TimeUnit.SECONDS))
|
||||
// 重试次数
|
||||
.withStopStrategy(StopStrategies.stopAfterAttempt(DEFAULT_RETRY_TIME))
|
||||
.retryIfResult(result -> result != null && (result.getCode() != 0 || result.getCode() != 200))
|
||||
.retryIfResult(result -> result == null || (result.getCode() != 0 && result.getCode() != 200))
|
||||
.withRetryListener(defaultRetryListener(name))
|
||||
.build();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user