before removing a pending hostinfo in handshake_manager, make sure it's the one we wanted to delete (#1811)

This commit is contained in:
Jack Doan
2026-07-21 10:31:00 -05:00
committed by GitHub
parent 3615a79b8b
commit a99699e370
+3 -1
View File
@@ -529,7 +529,9 @@ func (hm *HandshakeManager) DeleteHostInfo(hostinfo *HostInfo) {
func (hm *HandshakeManager) unlockedDeleteHostInfo(hostinfo *HostInfo) {
for _, addr := range hostinfo.vpnAddrs {
delete(hm.vpnIps, addr)
if cur, ok := hm.vpnIps[addr]; ok && cur.hostinfo == hostinfo {
delete(hm.vpnIps, addr)
}
}
if len(hm.vpnIps) == 0 {