diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-15 03:05:13 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-15 03:05:13 -0400 |
commit | 2d747e257be13a5f553db25a560c5c4621b0e75c (patch) | |
tree | 36c9fe2981706ce66c1b452045b3faeec08f5237 | |
parent | ec4a20f9fe68273b3784ff0fb6bd1e2a59f31110 (diff) | |
download | Atlas-2d747e257be13a5f553db25a560c5c4621b0e75c.tar.gz Atlas-2d747e257be13a5f553db25a560c5c4621b0e75c.zip |
pkg/api/api0: Fix ServerList UpdateServerByID eligibility checking
Made a typo when doing a refactor earlier.
-rw-r--r-- | pkg/api/api0/serverlist.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) } |