diff options
author | Alex Yatskov <alex@foosoft.net> | 2020-03-14 13:14:03 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2020-03-14 13:14:03 -0700 |
commit | b77e2afe3a8ef9e96a53dd8ca97d8b913941244b (patch) | |
tree | 818a2f25169845a72b3424b7400b5b07f0f7cacf /ext/fg/js/frontend-api-sender.js | |
parent | d32f4def0eeed1599857bc04c973337a2a13dd8b (diff) | |
parent | 98afe7adae80c6bc9de0c4b996e6f6cb0a5df49d (diff) |
Merge branch 'master' into testing
Diffstat (limited to 'ext/fg/js/frontend-api-sender.js')
-rw-r--r-- | ext/fg/js/frontend-api-sender.js | 3 |
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'); |