aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frontend-api-sender.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/fg/js/frontend-api-sender.js b/ext/fg/js/frontend-api-sender.js
index 8dc6aaf3..4431df61 100644
--- a/ext/fg/js/frontend-api-sender.js
+++ b/ext/fg/js/frontend-api-sender.js
@@ -31,6 +31,8 @@ class FrontendApiSender {
invoke(action, params, target) {
if (this.disconnected) {
+ // attempt to reconnect the next time
+ this.disconnected = false;
return Promise.reject(new Error('Disconnected'));
}
@@ -70,6 +72,7 @@ class FrontendApiSender {
onDisconnect() {
this.disconnected = true;
+ this.port = null;
for (const id of this.callbacks.keys()) {
this.onError(id, 'Disconnected');