forked from me-no-dev/ESPAsyncWebServer
fix onConnect not being called if there are no clients
This commit is contained in:
@@ -182,6 +182,8 @@ void AsyncEventSource::onConnect(ArEventHandlerFunction cb){
|
|||||||
void AsyncEventSource::_addClient(AsyncEventSourceClient * client){
|
void AsyncEventSource::_addClient(AsyncEventSourceClient * client){
|
||||||
if(_clients == NULL){
|
if(_clients == NULL){
|
||||||
_clients = client;
|
_clients = client;
|
||||||
|
if(_connectcb)
|
||||||
|
_connectcb(client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AsyncEventSourceClient * c = _clients;
|
AsyncEventSourceClient * c = _clients;
|
||||||
|
Reference in New Issue
Block a user