mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-25 13:05:49 +00:00
committed by
Nik Bougalis
parent
1dc3acb071
commit
fa0a61b5d7
@@ -180,12 +180,24 @@ ServerHandlerImp::onRequest (HTTP::Session& session)
|
||||
|
||||
auto detach = session.detach();
|
||||
|
||||
RPC::SuspendCallback suspend (
|
||||
[this, detach] (RPC::Suspend const& suspend) {
|
||||
processSession (detach, suspend);
|
||||
});
|
||||
RPC::Coroutine coroutine (suspend);
|
||||
coroutine.run();
|
||||
if (setup_.yieldStrategy.useCoroutines ==
|
||||
RPC::YieldStrategy::UseCoroutines::yes)
|
||||
{
|
||||
RPC::SuspendCallback suspend (
|
||||
[this, detach] (RPC::Suspend const& suspend) {
|
||||
processSession (detach, suspend);
|
||||
});
|
||||
RPC::Coroutine coroutine (suspend);
|
||||
coroutine.run();
|
||||
}
|
||||
else
|
||||
{
|
||||
getApp().getJobQueue().addJob (
|
||||
jtCLIENT, "RPC-Client",
|
||||
[=] (Job&) {
|
||||
processSession (detach, RPC::Suspend());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user