feature/relayserver: init server at config time instead of request time (#17484)

The lazy init led to confusion and a belief that was something was
wrong. It's reasonable to expect the daemon to listen on the port at the
time it's configured.

Updates tailscale/corp#33094

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited
2025-10-09 11:45:03 -07:00
committed by GitHub
parent 0f4dec928e
commit e2233b7942
4 changed files with 12 additions and 13 deletions
+3
View File
@@ -8,6 +8,7 @@ import (
"tailscale.com/ipn"
"tailscale.com/tsd"
"tailscale.com/types/logger"
"tailscale.com/types/ptr"
"tailscale.com/util/eventbus"
)
@@ -96,6 +97,7 @@ func Test_extension_profileStateChanged(t *testing.T) {
sys := tsd.NewSystem()
bus := sys.Bus.Get()
e := &extension{
logf: logger.Discard,
port: tt.fields.port,
bus: bus,
}
@@ -154,6 +156,7 @@ func Test_extension_handleBusLifetimeLocked(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
e := &extension{
logf: logger.Discard,
bus: eventbus.New(),
shutdown: tt.shutdown,
port: tt.port,