Merge pull request #310 from txgruppi/close-updates-chan-on-stop

Close updates chan on stop
bot-api-6.1
Kirill Zhuharev 2020-03-19 07:23:49 +03:00 committed by GitHub
commit b401ef076d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

1
bot.go
View File

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