Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onrik committed Jun 16, 2023
1 parent 0168088 commit 2be396d
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 118 deletions.
10 changes: 5 additions & 5 deletions bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,17 @@ func (bot *Bot) Start(allowedUpdates ...string) {
bot.logger.Printf("Get updates error (%s)\n", err.Error())
}

for _, update := range updates {
bot.updates <- update
bot.offset = update.UpdateID
}

select {
case <-bot.ctx.Done():
close(bot.updates)
return
default:
}

for _, update := range updates {
bot.updates <- update
bot.offset = update.UpdateID
}
}
}

Expand Down
Loading

0 comments on commit 2be396d

Please sign in to comment.