summaryrefslogtreecommitdiff
path: root/cli/rt/30_net.js
diff options
context:
space:
mode:
authorGiorgi Rostomashvili <giorgi.rostomashvili@inthepocket.com>2020-09-27 16:44:53 +0200
committerGitHub <noreply@github.com>2020-09-27 10:44:53 -0400
commiteaba9adb03f0427ecf0a7a8b6937a6b82e134266 (patch)
treefab0af73258911c360b2e562cf606c0262d47383 /cli/rt/30_net.js
parentdf02e315075456f8d5f75472abbb1fa81e237827 (diff)
fix: net listen crashes on explicit undefined hostname (#7706)
Diffstat (limited to 'cli/rt/30_net.js')
-rw-r--r--cli/rt/30_net.js4
1 files changed, 2 insertions, 2 deletions
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,
});