Close updates chan on stop
This commit is contained in:
parent
aa124ef1e8
commit
706e70933d
1 changed files with 1 additions and 0 deletions
1
bot.go
1
bot.go
|
@ -495,6 +495,7 @@ func (bot *BotAPI) GetUpdatesChan(config UpdateConfig) (UpdatesChannel, error) {
|
|||
for {
|
||||
select {
|
||||
case <-bot.shutdownChannel:
|
||||
close(ch)
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue