summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient/map.go
diff options
context:
space:
mode:
Diffstat (limited to 'control/controlclient/map.go')
-rw-r--r--control/controlclient/map.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/control/controlclient/map.go b/control/controlclient/map.go
index 84a7c2e8b..17c223fe3 100644
--- a/control/controlclient/map.go
+++ b/control/controlclient/map.go
@@ -459,8 +459,9 @@ func (ms *mapSession) removeUnwantedDiscoUpdates(resp *tailcfg.MapResponse, viaT
}
// Accept if:
- // - lastSeen moved forward in time.
- if existingLastSeen, ok := existingNode.LastSeen().GetOk(); ok &&
+ // - if we don't have a last seen to compare against on the existing node.
+ // - OR lastSeen moved forward in time.
+ if existingLastSeen, ok := existingNode.LastSeen().GetOk(); !ok ||
change.LastSeen.After(existingLastSeen) {
acceptedDiscoUpdates = append(acceptedDiscoUpdates, change)
}