Reducing retry time to max 60 seconds
This commit is contained in:
parent
7870c55185
commit
4e4a6f6c59
@ -122,10 +122,10 @@ class Server {
|
||||
setTimeout(this.runMempoolIntervalFunctions.bind(this), config.ELECTRS_POLL_RATE_MS);
|
||||
this.retryOnElectrsErrorAfterSeconds = 5;
|
||||
} catch (e) {
|
||||
this.retryOnElectrsErrorAfterSeconds *= 2;
|
||||
this.retryOnElectrsErrorAfterSeconds = Math.min(this.retryOnElectrsErrorAfterSeconds, 3600);
|
||||
logger.warn(`runMempoolIntervalFunctions error: ${(e.message || e)}. Retrying in ${this.retryOnElectrsErrorAfterSeconds} sec.`);
|
||||
setTimeout(this.runMempoolIntervalFunctions.bind(this), 1000 * this.retryOnElectrsErrorAfterSeconds);
|
||||
this.retryOnElectrsErrorAfterSeconds *= 2;
|
||||
this.retryOnElectrsErrorAfterSeconds = Math.min(this.retryOnElectrsErrorAfterSeconds, 60);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user