From ad7fd60fbbea3e9fca01e0495b1ac2e801c30576 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 95e68027c..ea8d6b3fb 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()