And now let's just avoid it at all

This commit is contained in:
riccardom
2026-06-16 21:58:05 +02:00
parent 0f5d7fdc07
commit b42fe6a10f

View File

@@ -296,10 +296,8 @@ func (c *ConnectClient) run(runCtx context.Context, config *profilemanager.Confi
log.Debug(err)
if s, ok := gstatus.FromError(err); ok && (s.Code() == codes.PermissionDenied) {
state.Set(StatusNeedsLogin)
// Called from inside the run goroutine: tear the engine down
// directly, never through the lifecycle queue (sup.stop would
// deadlock — the supervisor would wait for this very run to end).
_ = c.stopEngine()
// No teardown needed: login fails before the engine is started
// (engine.Start is below), so there is nothing running to stop.
return backoff.Permanent(wrapErr(err)) // unrecoverable error
}
return wrapErr(err)