mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Bump failover timeout to 5s
This commit is contained in:
parent
7744146ef7
commit
47a7564cfc
1 changed files with 2 additions and 2 deletions
|
@ -75,9 +75,9 @@ class FailoverRouter {
|
|||
|
||||
const results = await Promise.allSettled(this.hosts.map(async (host) => {
|
||||
if (host.socket) {
|
||||
return this.pollConnection.get<number>('/blocks/tip/height', { socketPath: host.host, timeout: 2000 });
|
||||
return this.pollConnection.get<number>('/blocks/tip/height', { socketPath: host.host, timeout: 5000 });
|
||||
} else {
|
||||
return this.pollConnection.get<number>(host.host + '/blocks/tip/height', { timeout: 2000 });
|
||||
return this.pollConnection.get<number>(host.host + '/blocks/tip/height', { timeout: 5000 });
|
||||
}
|
||||
}));
|
||||
const maxHeight = results.reduce((max, result) => Math.max(max, result.status === 'fulfilled' ? result.value?.data || 0 : 0), 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue