Close updates chan on stop

This commit is contained in:
Tarcisio Gruppi 2020-02-22 19:13:34 -03:00
parent aa124ef1e8
commit 706e70933d
No known key found for this signature in database
GPG key ID: 36F5005FCAF5C057

1
bot.go
View file

@ -495,6 +495,7 @@ func (bot *BotAPI) GetUpdatesChan(config UpdateConfig) (UpdatesChannel, error) {
for {
select {
case <-bot.shutdownChannel:
close(ch)
return
default:
}