Merge pull request #310 from txgruppi/close-updates-chan-on-stop
Close updates chan on stop
This commit is contained in:
commit
b401ef076d
1 changed files with 1 additions and 0 deletions
1
bot.go
1
bot.go
|
@ -503,6 +503,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:
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue