wait for goroutines to finish and for tun to actually be closed

This commit is contained in:
JackDoan
2026-04-16 13:19:25 -05:00
parent 183c1e3cfd
commit 6b2e6d9f55
6 changed files with 57 additions and 16 deletions

View File

@@ -144,10 +144,10 @@ func New(control *nebula.Control) (*Service, error) {
}
})
// Add the nebula wait function to the group
// Add the nebula wait function to the group so a fatal reader error
// propagates out through errgroup.Wait().
eg.Go(func() error {
wait()
return nil
return wait()
})
return &s, nil