make the query parameters available by passing the request to WS_EVT_CONNECT (#559)

Signed-off-by: Arthur Frederico Neves <arthurfred.neves@gmail.com>
This commit is contained in:
SharkSharp 2019-10-02 08:16:35 -04:00 committed by Me No Dev
parent e1be51fc8f
commit 4a34b46cc0
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ AsyncWebSocketClient::AsyncWebSocketClient(AsyncWebServerRequest *request, Async
_client->onData([](void *r, AsyncClient* c, void *buf, size_t len){ ((AsyncWebSocketClient*)(r))->_onData(buf, len); }, this);
_client->onPoll([](void *r, AsyncClient* c){ ((AsyncWebSocketClient*)(r))->_onPoll(); }, this);
_server->_addClient(this);
_server->_handleEvent(this, WS_EVT_CONNECT, NULL, NULL, 0);
_server->_handleEvent(this, WS_EVT_CONNECT, request, NULL, 0);
delete request;
}