From eaba9adb03f0427ecf0a7a8b6937a6b82e134266 Mon Sep 17 00:00:00 2001 From: Giorgi Rostomashvili Date: Sun, 27 Sep 2020 16:44:53 +0200 Subject: fix: net listen crashes on explicit undefined hostname (#7706) --- cli/rt/30_net.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/rt/30_net.js') diff --git a/cli/rt/30_net.js b/cli/rt/30_net.js index 53de5200d..9a71f0693 100644 --- a/cli/rt/30_net.js +++ b/cli/rt/30_net.js @@ -203,10 +203,10 @@ } } - function listen(options) { + function listen({ hostname, ...options }) { const res = opListen({ transport: "tcp", - hostname: "0.0.0.0", + hostname: typeof hostname === "undefined" ? "0.0.0.0" : hostname, ...options, }); -- cgit v1.2.3