Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marius-wieschollek/passwords-webextension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorMarius David Wieschollek <passwords.public@mdns.eu>2021-01-16 23:07:54 +0300
committerMarius David Wieschollek <passwords.public@mdns.eu>2021-01-16 23:07:54 +0300
commit5e6ad9282bb3464f0b16304a8549301987dd5a5b (patch)
tree23df32d6ce03d44d270629255644d1cfb53cddb9 /src/js
parentc60ad83f77fb0ab8f95183eb0bac9a0028a41fe4 (diff)
Stop error manager if background connection lost
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
Diffstat (limited to 'src/js')
-rw-r--r--src/js/Manager/ErrorManager.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/js/Manager/ErrorManager.js b/src/js/Manager/ErrorManager.js
index a015db8..37334b3 100644
--- a/src/js/Manager/ErrorManager.js
+++ b/src/js/Manager/ErrorManager.js
@@ -16,6 +16,7 @@ class ErrorManager {
constructor() {
this._errors = [];
this._mode = 'client';
+ this._sending = true;
}
/**
@@ -263,12 +264,14 @@ class ErrorManager {
* @private
*/
async _sendError(data) {
+ if(!this._sending) return;
try {
await SystemService.waitReady();
await QueueService
.getQueue('error', 'background')
.push(data);
} catch(e) {
+ this._sending = false;
this.logError(e);
}
}