From 2d747e257be13a5f553db25a560c5c4621b0e75c Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Sat, 15 Oct 2022 03:05:13 -0400 Subject: pkg/api/api0: Fix ServerList UpdateServerByID eligibility checking Made a typo when doing a refactor earlier. --- pkg/api/api0/serverlist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/api') diff --git a/pkg/api/api0/serverlist.go b/pkg/api/api0/serverlist.go index b56f880..de48ae0 100644 --- a/pkg/api/api0/serverlist.go +++ b/pkg/api/api0/serverlist.go @@ -458,7 +458,7 @@ func (s *ServerList) UpdateServerByID(id string, u *ServerUpdate) bool { // get the server if it's eligible for updates esrv, exists := s.servers2[id] - if !exists || !s.isServerAlive(esrv, t) || !u.Heartbeat || !s.isServerGhost(esrv, t) { + if !(exists || s.isServerAlive(esrv, t) || (u.Heartbeat && s.isServerGhost(esrv, t))) { if s.isServerGone(esrv, t) { s.freeServer(esrv) } -- cgit v1.2.3