From 0934e1d4c86aed04e6c5fde8ed1ba1935c8a61f3 Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 20 Feb 2023 20:38:19 -0800 Subject: [PATCH] fix broken p2p when ssl object is empty --- libs/commander/workerv2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/commander/workerv2.js b/libs/commander/workerv2.js index 755156d8..fdffd758 100644 --- a/libs/commander/workerv2.js +++ b/libs/commander/workerv2.js @@ -27,7 +27,7 @@ parentPort.on('message',(data) => { case'init': config = Object.assign({},data.config) lang = Object.assign({},data.lang) - remoteConnectionPort = config.ssl ? config.ssl.port || 443 : config.port || 8080 + remoteConnectionPort = config.ssl && JSON.stringify(config.ssl) !== '{}' ? config.ssl.port || 443 : config.port || 8080 initialize() break; case'exit':