Exceção ao tentar deletar uma instância com o handleQRCodes em andamento

未关闭
#222 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 9 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, rabbitmq
领域
backend

调研方向

The panic is in pkg/whatsmeow/service/whatsmeow.go at teardownQR (line 852) called from handleQRCodes (line 742). Read those functions to understand the channel lifecycle and the race with instance deletion. Add synchronization so send on closed channel cannot happen. Done means deletion during QR generation stops cleanly without panic.

由索引模型根据 Issue 内容生成。

描述

bug
Welcome!
  • Yes, I have searched for similar issues on GitHub and found none.
What did you do?

Através de captura de eventos via rabbitMQ, quando eu capturo o evento "QRTimeout" através de um consumer pelo RabbitMQ e, no mesmo momento o consumer tentou deletar a instância para interromper a geração do QRCode e parar de consumir recursos da máquina

What did you expect?

A instância ser deletada e a geração de QRCode ser interrompida

What did you observe instead of what you expected?

O serviço do evolutionGO lança uma exceção e é interrompido completamente, precisando reiniciar o serviço do docker

Screenshots/Videos

No response

Which version are you using?

0.7.2

What is your environment?

Docker

If applicable, paste the log output

whatsapp-1 | panic: send on closed channel
whatsapp-1 |
whatsapp-1 | goroutine 525 [running]:
whatsapp-1 | github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service.(*MyClient).teardownQR(0xc0018a8480, {0xc000a04330, 0x21}, 0x1)
whatsapp-1 | /build/pkg/whatsmeow/service/whatsmeow.go:852 +0x953
whatsapp-1 | github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service.(*MyClient).handleQRCodes.func1()
whatsapp-1 | /build/pkg/whatsmeow/service/whatsmeow.go:742 +0xec5
whatsapp-1 | created by github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service.(*MyClient).handleQRCodes in goroutine 523
whatsapp-1 | /build/pkg/whatsmeow/service/whatsmeow.go:704 +0x86

Additional Notes

No response

主要语言
Go
星标
1k
派生
610
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

evolution-foundation/evolution-go 的其他 Issue

查看 evolution-foundation/evolution-go 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。