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

Close updates chan on stop
This commit is contained in:
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
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:
}