From b3b2775af3a7ce74fbe5575b4b125d03af8b4398 Mon Sep 17 00:00:00 2001 From: Sakurapainting Date: Fri, 27 Mar 2026 23:58:05 +0800 Subject: [PATCH] fix(qq): honor context cancellation in startup READY probe --- pkg/channels/qq/qq.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/channels/qq/qq.go b/pkg/channels/qq/qq.go index 19ee09b1e..a259b8ae8 100644 --- a/pkg/channels/qq/qq.go +++ b/pkg/channels/qq/qq.go @@ -255,6 +255,11 @@ func (c *QQChannel) Start(ctx context.Context) error { return fmt.Errorf("failed to establish QQ websocket session: %w", err) } return fmt.Errorf("QQ websocket session exited unexpectedly during startup") + case <-c.ctx.Done(): + if c.cancel != nil { + c.cancel() + } + return fmt.Errorf("QQ websocket startup canceled: %w", c.ctx.Err()) case <-time.After(qqStartupProbe): if c.cancel != nil { c.cancel()