Skip to content

Commit

Permalink
Bug: Attempt to solve repost when sleepmode suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdicarlo committed Jun 22, 2021
1 parent aa707a7 commit 83aec1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions electron-app/src/server/submission/post/poster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class Poster extends EventEmitter {
return new Promise(async (resolve, reject) => {
let totalTries = this.retries + 1;
let error = null;
// Timeout after 15 minutes
// Timeout after 20 minutes
const timeoutTimer = setTimeout(() => {
if (!this.isDone) {
this.cancel();
Expand All @@ -201,8 +201,8 @@ export class Poster extends EventEmitter {
),
);
}
}, 15 * 60000);
while (totalTries > 0) {
}, 20 * 60000);
while (totalTries > 0 && !this.isCancelled()) {
try {
totalTries--;
const accountData: any = (await this.accountService.get(this.part.accountId)).data;
Expand Down

0 comments on commit 83aec1f

Please sign in to comment.