fix accept incoming network connections (#2216)
This commit is contained in:
parent
094b3fdb39
commit
2ff2b19e14
4
utils.go
4
utils.go
@ -139,10 +139,10 @@ func resolveAddress(addr []string) string {
|
|||||||
case 0:
|
case 0:
|
||||||
if port := os.Getenv("PORT"); port != "" {
|
if port := os.Getenv("PORT"); port != "" {
|
||||||
debugPrint("Environment variable PORT=\"%s\"", port)
|
debugPrint("Environment variable PORT=\"%s\"", port)
|
||||||
return ":" + port
|
return "localhost:" + port
|
||||||
}
|
}
|
||||||
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
|
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
|
||||||
return ":8080"
|
return "localhost:8080"
|
||||||
case 1:
|
case 1:
|
||||||
return addr[0]
|
return addr[0]
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user