server: print panic stack trace as string

debug.Stack() returns a byte slice.
This commit is contained in:
Simon Ser 2022-04-04 09:54:48 +02:00
parent 747263fc2d
commit 9f002d0409

View File

@ -314,7 +314,7 @@ func (s *Server) addUserLocked(user *User) *user {
go func() { go func() {
defer func() { defer func() {
if err := recover(); err != nil { if err := recover(); err != nil {
s.Logger.Printf("panic serving user %q: %v\n%v", user.Username, err, debug.Stack()) s.Logger.Printf("panic serving user %q: %v\n%v", user.Username, err, string(debug.Stack()))
} }
s.lock.Lock() s.lock.Lock()