FIx to return error on exceeding wsMaxSession
With previous codes, it panics on exceeding max sessions, but it
doesn't crash by recover then gives invalid response.
@@ -143,7 +143,7 @@ func (wm *wsSessionManager) initSession(ctx echo.Context, reqPtr interface{}) (*
}
c.WriteJSON(&wsResponse)
c.Close()
- return nil, err
+ return nil, errors.New("too many monitor")
}
return wss, nil
}
