fix: notify others when node is online

This commit is contained in:
Johan Siebens
2024-04-27 09:21:40 +02:00
parent 5adec31963
commit 3d21630bf3
+10
View File
@@ -43,6 +43,16 @@ func (n *pollMapSessionManager) Register(tailnetID uint64, machineID uint64, ch
t.Stop()
delete(n.timers, machineID)
}
timer := time.NewTimer(5 * time.Second)
go func() {
<-timer.C
if n.HasSession(tailnetID, machineID) {
n.NotifyAll(tailnetID, machineID)
}
}()
n.timers[machineID] = timer
}
func (n *pollMapSessionManager) Deregister(tailnetID uint64, machineID uint64) {