fix(qq): honor context cancellation in startup READY probe
This commit is contained in:
parent
7ea4f4d8e2
commit
b3b2775af3
1 changed files with 5 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue