From 47de7c1d4afc1ee894524e7d04e668cbfd41cfc5 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 30 Sep 2016 01:27:22 -0400 Subject: [PATCH] handle all tls conditions --- mux-ws.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mux-ws.js b/mux-ws.js index 7057a6d..7c03d1d 100644 --- a/mux-ws.js +++ b/mux-ws.js @@ -311,17 +311,14 @@ require('cluster-store').create().then(function (store) { var m; function tryTls() { - if (!servername || selfname === servername) { + if (!servername || selfname === servername || remotes[servername]) { console.log('this is a server or an unknown'); connectHttps(servername, browser); return; } - if (remotes[servername]) { - console.log("pipeWs(servername, service, socket, remotes['" + servername + "'])"); - pipeWs(servername, service, browser, remotes[servername]); - return; - } + console.log("pipeWs(servername, service, socket, remotes['" + servername + "'])"); + pipeWs(servername, service, browser, remotes[servername]); } // https://github.com/mscdex/httpolyglot/issues/3#issuecomment-173680155