Update server.go

This commit is contained in:
chrislu
2025-09-13 19:40:17 -07:00
parent f5871524be
commit cf584a35ef
+3 -1
View File
@@ -151,7 +151,9 @@ func (s *Server) Addr() string {
if s.ln == nil {
return ""
}
return s.ln.Addr().String()
// Normalize to an address reachable by clients
host, port := s.GetListenerAddr()
return net.JoinHostPort(host, strconv.Itoa(port))
}
// GetHandler returns the protocol handler (for testing)