Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3820dc9

Browse files
committed
Return early for status if endpoints are empty
1 parent 73a8d7e commit 3820dc9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tailnet/conn.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ func (c *Conn) SetNodeCallback(callback func(node *Node)) {
269269
callback(makeNode())
270270
})
271271
c.wireguardEngine.SetStatusCallback(func(s *wgengine.Status, err error) {
272+
if err != nil {
273+
return
274+
}
272275
endpoints := make([]string, 0, len(s.LocalAddrs))
273276
for _, addr := range s.LocalAddrs {
274277
endpoints = append(endpoints, addr.Addr.String())

0 commit comments

Comments
 (0)