mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
fix: expired peer missing in peer list
This commit is contained in:
@@ -66,6 +66,17 @@ func PeerCount(expected int) Condition {
|
||||
}
|
||||
}
|
||||
|
||||
func HasExpiredPeer(name string) Condition {
|
||||
return func(status *ipnstate.Status) bool {
|
||||
for _, peer := range status.Peer {
|
||||
if strings.HasPrefix(peer.DNSName, name) {
|
||||
return peer.Expired
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func HasCapability(capability tailcfg.NodeCapability) Condition {
|
||||
return func(status *ipnstate.Status) bool {
|
||||
self := status.Self
|
||||
|
||||
Reference in New Issue
Block a user