Skip to content

Commit

Permalink
修复Exit时的死循环问题 (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
raintean authored Jun 10, 2024
1 parent 59aaa46 commit da5620a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ func (b *Bot) webInit() error {
b.MessageErrorHandler = defaultMessageErrorHandler
}
for {
if !b.Alive() {
return
}
if err = b.syncCheck(); err != nil {
// 判断是否继续, 如果不继续则退出
if err = b.MessageErrorHandler(err); err != nil {
Expand Down

0 comments on commit da5620a

Please sign in to comment.