cnet/service: RandomPort no longer binds on 127.0.0.1

This commit is contained in:
CPunch 2024-02-23 18:34:10 -06:00
parent 02afe67ac3
commit de3e067b48

View File

@ -43,7 +43,7 @@ type Service struct {
} }
func RandomPort() (int, error) { func RandomPort() (int, error) {
l, err := net.Listen("tcp", "127.0.0.1:0") l, err := net.Listen("tcp", ":0")
if err != nil { if err != nil {
return 0, err return 0, err
} }