revert last tried pending event status to waiting when offline

so we don't fail the check if we can immediately remove when redacting
This commit is contained in:
Bruno Windels 2021-05-20 14:49:54 +02:00
parent df9e886f32
commit 618a32e6c0
2 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,11 @@ export class PendingEvent {
this._emitUpdate("status"); this._emitUpdate("status");
} }
setWaiting() {
this._status = SendStatus.Waiting;
this._emitUpdate("status");
}
get status() { return this._status; } get status() { return this._status; }
get error() { return this._error; } get error() { return this._error; }

View File

@ -74,6 +74,7 @@ export class SendQueue {
if (err instanceof ConnectionError) { if (err instanceof ConnectionError) {
this._offline = true; this._offline = true;
log.set("offline", true); log.set("offline", true);
pendingEvent.setWaiting();
} else { } else {
log.catch(err); log.catch(err);
pendingEvent.setError(err); pendingEvent.setError(err);