forked from External/ergo
log panic traces via the usual logging mechanism
This commit is contained in:
parent
054f57e215
commit
80968d000f
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue