mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
ipn: add missing locking in LocalBackend.NetMap
Looks like it's only used by tests.
This commit is contained in:
parent
2a8e064705
commit
5bc29e7388
@ -769,6 +769,8 @@ func (b *LocalBackend) doSetHostinfoFilterServices(hi *tailcfg.Hostinfo) {
|
|||||||
// NetMap returns the latest cached network map received from
|
// NetMap returns the latest cached network map received from
|
||||||
// controlclient, or nil if no network map was received yet.
|
// controlclient, or nil if no network map was received yet.
|
||||||
func (b *LocalBackend) NetMap() *controlclient.NetworkMap {
|
func (b *LocalBackend) NetMap() *controlclient.NetworkMap {
|
||||||
|
b.mu.Lock()
|
||||||
|
defer b.mu.Unlock()
|
||||||
return b.netMap
|
return b.netMap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user