fix onConnect not being called if there are no clients
This commit is contained in:
parent
0d02922e52
commit
a5674fab69
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue