mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-20 11:58:39 +00:00
wgengine: remove an allocation in reconfig
Minor.
This commit is contained in:
parent
b24029717b
commit
1ec27dbb5b
@ -316,9 +316,9 @@ func (e *userspaceEngine) Reconfig(cfg *wgcfg.Config, dnsDomains []string) error
|
|||||||
defer e.wgLock.Unlock()
|
defer e.wgLock.Unlock()
|
||||||
|
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
e.peerSequence = make([]wgcfg.Key, len(cfg.Peers))
|
e.peerSequence = e.peerSequence[:0]
|
||||||
for i, p := range cfg.Peers {
|
for _, p := range cfg.Peers {
|
||||||
e.peerSequence[i] = p.PublicKey
|
e.peerSequence = append(e.peerSequence, p.PublicKey)
|
||||||
}
|
}
|
||||||
e.mu.Unlock()
|
e.mu.Unlock()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user