From 4cc2430db2e2c63d924188a11295ba5db77e3738 Mon Sep 17 00:00:00 2001 From: ensonic Date: Tue, 3 Feb 2026 11:50:10 +0000 Subject: [PATCH] Allow tests to specify '0' to let the os select a port. The production uses always initialize the config with the port flag, so this codepath won't trigger. I can't explain why the tests worked before. --- src/go/cmd/http-relay-server/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/cmd/http-relay-server/server/server.go b/src/go/cmd/http-relay-server/server/server.go index acda1624..e3521e75 100644 --- a/src/go/cmd/http-relay-server/server/server.go +++ b/src/go/cmd/http-relay-server/server/server.go @@ -76,7 +76,7 @@ type Server struct { } func NewServer(conf Config) *Server { - if conf.Port == 0 { + if conf.Port == -1 { // let tests pass a value of 0 to let the os pick a port conf.Port = DefaultPort } if conf.BlockSize == 0 {