add engine stop to run in foreground mode

This commit is contained in:
Pascal Fischer
2024-10-01 15:39:38 +02:00
parent 24c0aaa745
commit 5eb936b49e

View File

@ -295,6 +295,13 @@ func (c *ConnectClient) run(
<-engineCtx.Done()
c.statusRecorder.ClientTeardown()
c.engineMutex.Lock()
err = c.Engine().Stop()
c.engineMutex.Unlock()
if err != nil {
return err
}
backOff.Reset()
log.Info("stopped NetBird client")