aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 03:05:13 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 03:05:13 -0400
commit2d747e257be13a5f553db25a560c5c4621b0e75c (patch)
tree36c9fe2981706ce66c1b452045b3faeec08f5237 /pkg
parentec4a20f9fe68273b3784ff0fb6bd1e2a59f31110 (diff)
downloadAtlas-2d747e257be13a5f553db25a560c5c4621b0e75c.tar.gz
Atlas-2d747e257be13a5f553db25a560c5c4621b0e75c.zip
pkg/api/api0: Fix ServerList UpdateServerByID eligibility checking
Made a typo when doing a refactor earlier.
Diffstat (limited to 'pkg')
-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 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)
}