PLT-6226 fixing race in IsAuth (#7296)

* Fixing race in isAuth function

* PLT-6226 fixing race in IsAuth

* Moving int64 to top so it's aligned

* Adding comment and fixing asymmetric call
This commit is contained in:
Corey Hulen
2017-09-05 07:58:47 -07:00
committed by GitHub
parent 7843dc3cfa
commit d6383643cb
4 changed files with 71 additions and 31 deletions

View File

@@ -23,7 +23,7 @@ type webSocketHandler struct {
func (wh webSocketHandler) ServeWebSocket(conn *app.WebConn, r *model.WebSocketRequest) {
l4g.Debug("/api/v3/users/websocket:%s", r.Action)
session, sessionErr := app.GetSession(conn.SessionToken)
session, sessionErr := app.GetSession(conn.GetSessionToken())
if sessionErr != nil {
l4g.Error(utils.T("api.web_socket_handler.log.error"), "/api/v3/users/websocket", r.Action, r.Seq, conn.UserId, sessionErr.SystemMessage(utils.T), sessionErr.Error())
sessionErr.DetailedError = ""