mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
wgengine: use slices.Clone in two places
Updates #cleanup Change-Id: I1cb30efb6d09180e82b807d6146f37897ef99307 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
74b8985e19
commit
a8a525282c
@ -13,6 +13,7 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@ -1040,9 +1041,8 @@ func (e *userspaceEngine) getStatus() (*Status, error) {
|
|||||||
|
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
closing := e.closing
|
closing := e.closing
|
||||||
peerKeys := make([]key.NodePublic, len(e.peerSequence))
|
peerKeys := slices.Clone(e.peerSequence)
|
||||||
copy(peerKeys, e.peerSequence)
|
localAddrs := slices.Clone(e.endpoints)
|
||||||
localAddrs := append([]tailcfg.Endpoint(nil), e.endpoints...)
|
|
||||||
e.mu.Unlock()
|
e.mu.Unlock()
|
||||||
|
|
||||||
if closing {
|
if closing {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user