Merge pull request #3644 from vector-im/rav/fix_rageshake_race
rageshake: fix race when collecting logspull/3646/head
commit
fa132d3945
|
@ -205,9 +205,6 @@ class IndexedDBLogStore {
|
||||||
}
|
}
|
||||||
let txn = this.db.transaction(["logs", "logslastmod"], "readwrite");
|
let txn = this.db.transaction(["logs", "logslastmod"], "readwrite");
|
||||||
let objStore = txn.objectStore("logs");
|
let objStore = txn.objectStore("logs");
|
||||||
objStore.add(this._generateLogEntry(lines));
|
|
||||||
let lastModStore = txn.objectStore("logslastmod");
|
|
||||||
lastModStore.put(this._generateLastModifiedTime());
|
|
||||||
txn.oncomplete = (event) => {
|
txn.oncomplete = (event) => {
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
|
@ -219,6 +216,9 @@ class IndexedDBLogStore {
|
||||||
new Error("Failed to write logs: " + event.target.errorCode)
|
new Error("Failed to write logs: " + event.target.errorCode)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
objStore.add(this._generateLogEntry(lines));
|
||||||
|
let lastModStore = txn.objectStore("logslastmod");
|
||||||
|
lastModStore.put(this._generateLastModifiedTime());
|
||||||
});
|
});
|
||||||
return this.flushPromise;
|
return this.flushPromise;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue