You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by hu...@apache.org on 2021/08/06 00:58:56 UTC
[dubbo-js] branch master updated: fixed: dubbo-common reset retry
This is an automated email from the ASF dual-hosted git repository.
hufeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-js.git
The following commit(s) were added to refs/heads/master by this push:
new d3b044e fixed: dubbo-common reset retry
d3b044e is described below
commit d3b044e841ce1799bd752c29d1f75eb4660c8e6d
Author: hufeng <fe...@gmail.com>
AuthorDate: Fri Aug 6 08:58:31 2021 +0800
fixed: dubbo-common reset retry
---
packages/dubbo-common/src/retry.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/dubbo-common/src/retry.ts b/packages/dubbo-common/src/retry.ts
index 97fd8a4..604478e 100644
--- a/packages/dubbo-common/src/retry.ts
+++ b/packages/dubbo-common/src/retry.ts
@@ -24,12 +24,14 @@ const dlog = debug('dubbo-server:retry~')
export class Retry {
private retryNum: number
private readonly delay: number
+ private readonly maxRetryCount: number
private readonly retry: Function
private readonly end: Function
constructor(props: IRetryProps) {
- this.retryNum = props.maxRetry || MAX_RETRIES
+ this.maxRetryCount = props.maxRetry || MAX_RETRIES
+ this.retryNum = this.maxRetryCount
this.retry = props.retry
this.end = props.end
this.delay = props.delay || 1000
@@ -58,6 +60,6 @@ export class Retry {
reset() {
dlog('reset')
- this.retryNum = MAX_RETRIES
+ this.retryNum = this.maxRetryCount
}
}