Skip to content

Commit

Permalink
discord connection closes cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
euanwm committed Oct 6, 2024
1 parent 38a7dc3 commit 45681fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func RestartHandler(bot *discordbot.DiscordBot) {
<-signals
// post an update into Discord with how many bytes of data were handler
_, _ = bot.PostPlatformData(fmt.Sprintf("Total backend data handled today: %s", TheBank.UnitToString()))
err := bot.CloseConnection()
if err != nil {
log.Printf("Error when closing discord connection: %s", err)
}
}

// @title OpenWeightlifting API
Expand Down

0 comments on commit 45681fa

Please sign in to comment.