From 0b6e4439bcf8581d01d5bb8b06dc168bd3c36f2c Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Mon, 25 Sep 2017 19:56:12 +0200 Subject: [PATCH] Possibly fix #198 --- js/term/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/term/connection.js b/js/term/connection.js index 10a63ea..7b799ca 100644 --- a/js/term/connection.js +++ b/js/term/connection.js @@ -129,7 +129,7 @@ module.exports = class TermConnection extends EventEmitter { closeSocket () { if (this.ws) { this.forceClosing = true - this.ws.close() + if (this.ws.readyState === 1) this.ws.close() this.ws = null } }