aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/api0
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 04:11:36 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 04:11:36 -0400
commiteed08ece563e5d0fdd5eee82c3cd157d464f18c8 (patch)
tree5ced36fa8514881f9c667d4a79900fc46118b84e /pkg/api/api0
parentc92c8bbf3ca39064245677f0034d2795848b4df1 (diff)
downloadAtlas-eed08ece563e5d0fdd5eee82c3cd157d464f18c8.tar.gz
Atlas-eed08ece563e5d0fdd5eee82c3cd157d464f18c8.zip
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.
Diffstat (limited to 'pkg/api/api0')
-rw-r--r--pkg/api/api0/serverlist.go2
1 files changed, 1 insertions, 1 deletions
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)
}
}