Skip to content

Commit

Permalink
fix(testutil): fix FreeTCPAddr localhost usage (#18996)
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax authored Jan 10, 2024
1 parent 8d71191 commit 78ce70d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testutil/network/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func writeFile(name, dir string, contents []byte) error {
// Get a free address for a test CometBFT server
// protocol is either tcp, http, etc
func FreeTCPAddr() (addr, port string, closeFn func() error, err error) {
l, err := net.Listen("tcp", "localhost:0")
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
return "", "", nil, err
}
Expand Down

0 comments on commit 78ce70d

Please sign in to comment.