Cancel the constructor-created context before overwriting in Start() to prevent the original cancel function from becoming unreachable. Move len(processedMsgs) check inside the write lock to eliminate a data race, and re-insert the current msgID after map reset to prevent duplicate processing of the in-flight message. Applies to both WeComBotChannel and WeComAppChannel. |
||
|---|---|---|
| .. | ||
| app.go | ||
| app_test.go | ||
| bot.go | ||
| bot_test.go | ||
| common.go | ||
| init.go | ||