From 2ff2b19e14420de970264012e1bcdf91929725b4 Mon Sep 17 00:00:00 2001 From: kebo Date: Sat, 7 Mar 2020 09:21:02 +0800 Subject: [PATCH] fix accept incoming network connections (#2216) --- utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index 71b80de7..77b5f0c8 100644 --- a/utils.go +++ b/utils.go @@ -139,10 +139,10 @@ func resolveAddress(addr []string) string { case 0: if port := os.Getenv("PORT"); port != "" { debugPrint("Environment variable PORT=\"%s\"", port) - return ":" + port + return "localhost:" + port } debugPrint("Environment variable PORT is undefined. Using port :8080 by default") - return ":8080" + return "localhost:8080" case 1: return addr[0] default: