From eed08ece563e5d0fdd5eee82c3cd157d464f18c8 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Sat, 15 Oct 2022 04:11:36 -0400 Subject: pkg/api/api0: Include the conflicting server's game addr in error for duplicate auth addr Will help server owners with troubleshooting and doesn't leak too much private info since the IP will be the same. --- pkg/api/api0/serverlist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/api/api0') diff --git a/pkg/api/api0/serverlist.go b/pkg/api/api0/serverlist.go index 9c9d04e..90aebb5 100644 --- a/pkg/api/api0/serverlist.go +++ b/pkg/api/api0/serverlist.go @@ -451,7 +451,7 @@ func (s *ServerList) PutServerByAddr(x *Server) (string, bool, error) { // error if there's an existing server with a matching auth addr if esrv, exists := s.servers3[nsrv.AuthAddr()]; exists { if s.isServerAlive(esrv, t) { - return "", false, fmt.Errorf("%w %s", ErrServerListDuplicateAuthAddr, nsrv.AuthAddr()) + return "", false, fmt.Errorf("%w %s (used for server %s)", ErrServerListDuplicateAuthAddr, nsrv.AuthAddr(), esrv.Addr) } } -- cgit v1.2.3