server: fix panic stacktrace print formatting

This change uses string formatting for the output of debug.Stack. The
output of debug.Stack is []byte, which isn't human readable.
This commit is contained in:
Jeff Martin 2022-08-07 13:38:13 -07:00 committed by Simon Ser
parent 0ef8b7d4c8
commit a662091a9d

View File

@ -414,7 +414,7 @@ var lastDownstreamID uint64
func (s *Server) handle(ic ircConn) {
defer func() {
if err := recover(); err != nil {
s.Logger.Printf("panic serving downstream %q: %v\n%v", ic.RemoteAddr(), err, debug.Stack())
s.Logger.Printf("panic serving downstream %q: %v\n%v", ic.RemoteAddr(), err, string(debug.Stack()))
}
}()