mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Don't cut off early if last retry
This commit is contained in:
parent
e84957a2c8
commit
94ca291460
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ export class Postgres implements IDatabase {
|
|||
|
||||
pendingQueries.push(savePromiseState(lastPool.query({ text: query, values: params })));
|
||||
const currentPromises = [...pendingQueries];
|
||||
if (options.useReplica) currentPromises.push(savePromiseState(timeoutPomise(this.config.postgresReadOnly.readTimeout)));
|
||||
if (options.useReplica && maxTries() - tries > 1) currentPromises.push(savePromiseState(timeoutPomise(this.config.postgresReadOnly.readTimeout)));
|
||||
const queryResult = await nextFulfilment(currentPromises);
|
||||
|
||||
switch (type) {
|
||||
|
|
Loading…
Reference in a new issue