diff --git a/client/internal/connect.go b/client/internal/connect.go index dd964aed0..4f594fb5e 100644 --- a/client/internal/connect.go +++ b/client/internal/connect.go @@ -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