mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-10-16 05:50:20 +00:00
cnet/service: RandomPort no longer binds on 127.0.0.1
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user