From 370a064bce91f45e3706d9f4e21c64e6434d2392 Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Wed, 8 Jan 2025 15:45:24 +0100 Subject: [PATCH] fix: Properly terminate protocol Addresses #345 --- html5/js/Client.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/html5/js/Client.js b/html5/js/Client.js index 4e4243a7..04a5eb44 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -675,6 +675,7 @@ class XpraClient { this.connected = false; if (this.protocol) { this.protocol.close(); + this.protocol.terminate(); this.protocol = null; } } @@ -2397,7 +2398,6 @@ class XpraClient { do_reconnect() { //try again: this.reconnect_in_progress = true; - const protocol = this.protocol; setTimeout(() => { try { this.remove_windows(); @@ -2405,10 +2405,7 @@ class XpraClient { this.cancel_all_files(); this.clear_timers(); this.init_state(); - if (protocol) { - this.protocol = null; - protocol.terminate(); - } + this.close_protocol(); this.emit_connection_lost(); this.connect(); } finally {