diff --git a/src/AsyncEventSource.cpp b/src/AsyncEventSource.cpp index 6ca9bad..4118f7f 100644 --- a/src/AsyncEventSource.cpp +++ b/src/AsyncEventSource.cpp @@ -182,6 +182,8 @@ void AsyncEventSource::onConnect(ArEventHandlerFunction cb){ void AsyncEventSource::_addClient(AsyncEventSourceClient * client){ if(_clients == NULL){ _clients = client; + if(_connectcb) + _connectcb(client); return; } AsyncEventSourceClient * c = _clients;