From e3c046374f3b2e2cebc8a7607ecf18d30d34cac6 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 13 Jun 2018 11:44:23 -0600 Subject: [PATCH] bugfixes --- bin/telebit.js | 2 +- bin/telebitd.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/telebit.js b/bin/telebit.js index bfa7498..e5f3a59 100644 --- a/bin/telebit.js +++ b/bin/telebit.js @@ -306,7 +306,7 @@ function askForConfig(answers, mainCb) { function next() { var q = nextSet.shift(); if (!q) { - if (useTty) { stdin.end(); stdin.close(); } + if (useTty) { stdin.close(); } rl.close(); mainCb(null, answers); return; } diff --git a/bin/telebitd.js b/bin/telebitd.js index 34260b9..33c2aed 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -153,12 +153,12 @@ function serveControls() { if ('undefined' !== typeof conf.telemetry) { state.config.telemetry = conf.telemetry; } - conf.servernames.forEach(function (key) { + Object.keys(conf.servernames).forEach(function (key) { if (!state.config.servernames[key]) { state.config.servernames[key] = {}; } }); - conf.ports.forEach(function (key) { + Object.keys(conf.ports).forEach(function (key) { if (!state.config.ports[key]) { state.config.ports[key] = {}; }