From 933cf1c84ded6eaaa659e8c0f95aea0b1f52bebb Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Tue, 1 Oct 2024 15:44:32 +0200 Subject: [PATCH] extract getting engine --- client/internal/connect.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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