mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-11 06:29:29 +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() {
|
defer func() {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
client.server.logger.Error("internal", fmt.Sprintf("Client caused panic, disconnecting: %v", r))
|
client.server.logger.Error("internal",
|
||||||
debug.PrintStack()
|
fmt.Sprintf("Client caused panic, disconnecting: %v\n%s", r, debug.Stack()))
|
||||||
}
|
}
|
||||||
// ensure client connection gets closed
|
// ensure client connection gets closed
|
||||||
client.destroy()
|
client.destroy()
|
||||||
|
Loading…
Reference in New Issue
Block a user