From 802316fc408338fbdef127b8f2a7dbe0dd1ebf9d Mon Sep 17 00:00:00 2001 From: WhoSoup <34172041+WhoSoup@users.noreply.github.com> Date: Wed, 30 Sep 2020 18:10:39 +0200 Subject: [PATCH] use right variable (#1068) --- wsapi/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsapi/server.go b/wsapi/server.go index 4e6126f1a3..24e6af4684 100644 --- a/wsapi/server.go +++ b/wsapi/server.go @@ -113,7 +113,7 @@ func PanicRecovery() Middleware { return func(f http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { defer func() { - if recover(); r != nil { + if rec := recover(); rec != nil { //trace := debug.Stack() //wsLog.Errorf("Recovered from a panic: %v: %s", rec, string(trace)) HandleV2Error(w, nil, NewInternalError())