From 4a34b46cc029bbee584c138f78461aa2148f7de3 Mon Sep 17 00:00:00 2001 From: SharkSharp Date: Wed, 2 Oct 2019 08:16:35 -0400 Subject: [PATCH] make the query parameters available by passing the request to WS_EVT_CONNECT (#559) Signed-off-by: Arthur Frederico Neves --- src/AsyncWebSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index e4592a3..f885021 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -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; }