mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-27 19:43:01 +00:00
Merge 0ce86e813a7df752a25b18fa080f386721adf0a8 into b3455fa99a5e8d07133d5140017ec7c49f032a07
This commit is contained in:
commit
f49fa50996
@ -771,16 +771,17 @@ func (c *Conn) setEndpoints(endpoints []tailcfg.Endpoint) (changed bool) {
|
||||
}
|
||||
|
||||
c.lastEndpointsTime = time.Now()
|
||||
if !endpointSetsEqual(endpoints, c.lastEndpoints) {
|
||||
changed = true
|
||||
}
|
||||
// lastEndpoints must be updated before onEndpointsRefreshed,
|
||||
// as CallMyMaybe sent via this callback must observe the new endpoints.
|
||||
c.lastEndpoints = endpoints
|
||||
for de, fn := range c.onEndpointRefreshed {
|
||||
go fn()
|
||||
delete(c.onEndpointRefreshed, de)
|
||||
}
|
||||
|
||||
if endpointSetsEqual(endpoints, c.lastEndpoints) {
|
||||
return false
|
||||
}
|
||||
c.lastEndpoints = endpoints
|
||||
return true
|
||||
return changed
|
||||
}
|
||||
|
||||
// SetStaticEndpoints sets static endpoints to the provided value and triggers
|
||||
|
Loading…
x
Reference in New Issue
Block a user