We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ca6f1f commit 2fa77a9Copy full SHA for 2fa77a9
tailnet/conn.go
@@ -276,11 +276,13 @@ func (c *Conn) SetNodeCallback(callback func(node *Node)) {
276
for _, addr := range s.LocalAddrs {
277
endpoints = append(endpoints, addr.Addr.String())
278
}
279
- c.lastMutex.Lock()
280
- c.lastEndpoints = endpoints
281
- node := makeNode()
282
- c.lastMutex.Unlock()
283
- callback(node)
+ go func() {
+ c.lastMutex.Lock()
+ c.lastEndpoints = endpoints
+ node := makeNode()
+ c.lastMutex.Unlock()
284
+ callback(node)
285
+ }()
286
})
287
288
0 commit comments