Skip to content

Commit

Permalink
fix: channel not closing, added more logs (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekomeowww authored May 9, 2023
1 parent f48968a commit 63bb795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/bots/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ func Run() func(bot *SlackBot) error {
}
}()

bot.logger.Infof("Slack Bot/App webhook server is listening on %s", bot.server.Addr)

go bot.runSmr()

return nil
Expand Down
4 changes: 4 additions & 0 deletions internal/bots/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ func (b *Bot) stop(ctx context.Context) error {
if err := b.webhookServer.Shutdown(closeCtx); err != nil && err != http.ErrServerClosed {
return fmt.Errorf("failed to shutdown webhook server: %w", err)
}

close(b.webhookUpdateChan)
} else {
b.StopReceivingUpdates()
}
Expand Down Expand Up @@ -230,6 +232,8 @@ func (b *Bot) start() error {
b.logger.Fatal(err)
}
}()

b.logger.Infof("Telegram Bot webhook server is listening on %s", b.webhookServer.Addr)
}

go b.startPullUpdates()
Expand Down

0 comments on commit 63bb795

Please sign in to comment.