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 1a5d3ea commit 53f8adbCopy full SHA for 53f8adb
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