Skip to content

Commit

Permalink
use right variable (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhoSoup authored Sep 30, 2020
1 parent 0e841e6 commit 802316f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wsapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 802316f

Please sign in to comment.