tsnet: explicit message for panic seen in CI

Updates #7488

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
pull/7492/head
David Crawshaw 2 years ago committed by David Crawshaw
parent f7a7957a11
commit 9245d813c6

@ -214,7 +214,12 @@ func (s *Server) Loopback() (addr string, proxyCred, localAPICred string, err er
}()
}
return s.loopbackListener.Addr().String(), s.proxyCred, s.localAPICred, nil
lbAddr := s.loopbackListener.Addr()
if lbAddr == nil {
// https://github.com/tailscale/tailscale/issues/7488
panic("loopbackListener has no Addr")
}
return lbAddr.String(), s.proxyCred, s.localAPICred, nil
}
type localSecHandler struct {

Loading…
Cancel
Save