Close updates chan on stop

bot-api-6.1
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 changed files with 1 additions and 0 deletions

1
bot.go
View File

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