From fdc7475f4998c2528c90302de6543a04e92a8818 Mon Sep 17 00:00:00 2001 From: Bryan Gerlach Date: Tue, 12 Sep 2023 23:39:23 -0500 Subject: [PATCH] set status to 0 for offline --- src/rendezvous_server.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 51f07b75..8531b1cc 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -789,8 +789,10 @@ impl RendezvousServer { let bit_idx = 7 - i % 8; if elapsed < REG_TIMEOUT { states[states_idx] |= 0x01 << bit_idx; + self.pm.update_status(peer_id, &states[states_idx]).await; + } else { + self.pm.update_status(peer_id, &0).await; } - self.pm.update_status(peer_id, &states[states_idx]).await; } else { self.pm.update_status(peer_id, &0).await; }