mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-04 22:10:56 +01:00
extract getting engine
This commit is contained in:
parent
5eb936b49e
commit
933cf1c84d
@ -296,7 +296,10 @@ func (c *ConnectClient) run(
|
||||
c.statusRecorder.ClientTeardown()
|
||||
|
||||
c.engineMutex.Lock()
|
||||
err = c.Engine().Stop()
|
||||
engine := c.Engine()
|
||||
if engine != nil {
|
||||
err = engine.Stop()
|
||||
}
|
||||
c.engineMutex.Unlock()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user