mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-03 13:56:36 +09:00
wgengine/magicsock: avoid copying lock in Test_endpoint_handlePongConnLocked (#22641)
This patch removes an accidental copy of a lock: $ ./tool/go vet ./... literal copies lock value from pm: tailscale.com/wgengine/magicsock.peerMap contains sync.RWMutex Updates #22645 Change-Id: Id171051838b66b8dd9dff755d803bbc18142bea4 Signed-off-by: Simon Law <sfllaw@tailscale.com>
This commit is contained in:
1 parent
e906a6a44b
commit
445df50dcf
1 file changed
+1
-2
@@ -741,10 +741,9 @@ func Test_endpoint_handlePongConnLocked(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
synctest.Test(t, func(t *testing.T) {
|
||||
now := mono.Now() // synctest to match this to the internal 'now'
|
||||
pm := newPeerMap()
|
||||
c := &Conn{
|
||||
logf: func(msg string, args ...any) {},
|
||||
peerMap: pm,
|
||||
peerMap: newPeerMap(),
|
||||
}
|
||||
c.discoAtomic.Set(key.NewDisco())
|
||||
de := &endpoint{
|
||||
|
||||
Reference in new issue
Block a user