Closed odourain closed 9 months ago
Before starting the bot I do a setCommands and its goroutine [which reads channel variable] does not have time to complete before the start method [which writes to channel variable].
which reads channel variable
which writes to channel variable
Previous read at 0x00c0015a6628 by goroutine 106: https://github.com/tucnak/telebot/blob/v3/api.go#L39
Write at 0x00c0015a6628 by main goroutine: https://github.com/tucnak/telebot/blob/v3/bot.go#L205
Use mutex for use channel stopClient.
stopClient
Also added changes from https://github.com/caalberts/telebot to work with testnet.
Problem
Before starting the bot I do a setCommands and its goroutine [
which reads channel variable
] does not have time to complete before the start method [which writes to channel variable
].Previous read at 0x00c0015a6628 by goroutine 106: https://github.com/tucnak/telebot/blob/v3/api.go#L39
Write at 0x00c0015a6628 by main goroutine: https://github.com/tucnak/telebot/blob/v3/bot.go#L205
Decision
Use mutex for use channel
stopClient
.Also added changes from https://github.com/caalberts/telebot to work with testnet.