Skip to content

Commit

Permalink
include stats in error log when encoding stats fails
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygd committed Jan 5, 2025
1 parent 9619e6c commit 1ac165d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beszel/internal/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (a *Agent) startServer(pubKey []byte, addr string) {
func (a *Agent) handleSession(s sshServer.Session) {
stats := a.gatherStats()
if err := json.NewEncoder(s).Encode(stats); err != nil {
slog.Error("Error encoding stats", "err", err)
slog.Error("Error encoding stats", "err", err, "stats", stats)
s.Exit(1)
return
}
Expand Down

0 comments on commit 1ac165d

Please sign in to comment.