mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
log panic traces via the usual logging mechanism
This commit is contained in:
parent
054f57e215
commit
80968d000f
@ -186,8 +186,8 @@ func (client *Client) run() {
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
client.server.logger.Error("internal", fmt.Sprintf("Client caused panic, disconnecting: %v", r))
|
||||
debug.PrintStack()
|
||||
client.server.logger.Error("internal",
|
||||
fmt.Sprintf("Client caused panic, disconnecting: %v\n%s", r, debug.Stack()))
|
||||
}
|
||||
// ensure client connection gets closed
|
||||
client.destroy()
|
||||
|
Loading…
Reference in New Issue
Block a user