fixed compilation by modifying wrappers to account for the shared_ptr mService

This commit is contained in:
csoler 2019-11-23 15:11:22 +01:00
parent 009ed54ce2
commit b8b7d103e1
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
9 changed files with 33 additions and 57 deletions

View file

@ -55,7 +55,7 @@ $%callbackParamsSerialization%$
sStream << "data: " << compactJSON << ctx.mJson << "\n\n";
const std::string message = sStream.str();
mService.schedule( [weakSession, message]()
mService->schedule( [weakSession, message]()
{
auto session = weakSession.lock();
if(!session || session->is_closed()) return;

View file

@ -326,7 +326,7 @@ int main(int argc, char *argv[])
QString sessionDelayedClose;
if(hasMultiCallback)
sessionDelayedClose = "RsThread::async( [=](){ std::this_thread::sleep_for(std::chrono::seconds(maxWait+120)); mService.schedule( [=](){ auto session = weakSession.lock(); if(session && session->is_open()) session->close(); } ); } );";
sessionDelayedClose = "RsThread::async( [=](){ std::this_thread::sleep_for(std::chrono::seconds(maxWait+120)); mService->schedule( [=](){ auto session = weakSession.lock(); if(session && session->is_open()) session->close(); } ); } );";
QString callbackParamsSerialization;