mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
modules/client/sync: Minor hackstops for now.
This commit is contained in:
parent
ae1c6cc680
commit
0da335c03c
1 changed files with 11 additions and 2 deletions
|
@ -158,7 +158,10 @@ ircd::m::sync::longpoll::handle_notify(const m::event &event,
|
|||
return;
|
||||
|
||||
if(!polling)
|
||||
{
|
||||
queue.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
queue.emplace_back(eval);
|
||||
dock.notify_all();
|
||||
|
@ -177,14 +180,20 @@ try
|
|||
|
||||
while(1)
|
||||
{
|
||||
dock.wait_until(args.timesout);
|
||||
if(!dock.wait_until(args.timesout))
|
||||
throw m::error
|
||||
{
|
||||
http::REQUEST_TIMEOUT, "M_TIMEOUT", "Timed out"
|
||||
};
|
||||
|
||||
if(queue.empty())
|
||||
continue;
|
||||
|
||||
const auto &a(queue.front());
|
||||
const unwind pop{[]
|
||||
{
|
||||
queue.pop_front();
|
||||
if(polling <= 1)
|
||||
queue.pop_front();
|
||||
}};
|
||||
|
||||
if(handle(client, args, a))
|
||||
|
|
Loading…
Reference in a new issue