* use sync.pool for session

* added back to sync pool

* reverted change

* added a new line

* added back session object

* added back session object

* added back session object

* revert

* refactored into function

* added the session object back into the pool

* work in progress

* work in progress

* work in progress

* code review comments

Co-authored-by: Arjuna Marambe <arjunam@buildxact.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Arjuna Marambe
2021-01-28 05:58:24 +11:00
коммит произвёл GitHub
родитель 7f8850398c
Коммит 5f16fc644a
8 изменённых файлов: 33 добавлений и 13 удалений

Просмотреть файл

@@ -29,6 +29,8 @@ func (wh webSocketHandler) ServeWebSocket(conn *app.WebConn, r *model.WebSocketR
return
}
session, sessionErr := wh.app.GetSession(conn.GetSessionToken())
defer app.ReturnSessionToPool(session)
if sessionErr != nil {
mlog.Error(
"websocket session error",