Skip to content

Commit

Permalink
Add sessions reporting to log, closes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Aug 10, 2021
1 parent dbabc3a commit b559bf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ func (b *Bot) handleErrorEvent(err error) error {
}

func (b *Bot) handleLatencyReportEvent(ev *slack.LatencyReport) error {
log.Printf("Current latency: %v\n", ev.Value)
b.mu.Lock()
defer b.mu.Unlock()
log.Printf("%d active session(s), current latency: %v\n", len(b.sessions), ev.Value)
return nil
}

Expand Down

0 comments on commit b559bf7

Please sign in to comment.