mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
modules/client/sync: Check if the client is still alive during longpoll.
This commit is contained in:
parent
38f7d61020
commit
f745787ce4
1 changed files with 14 additions and 0 deletions
|
@ -558,6 +558,9 @@ try
|
|||
if(!dock.wait_until(args.timesout))
|
||||
break;
|
||||
|
||||
assert(data.client && data.client->sock);
|
||||
check(*data.client->sock);
|
||||
|
||||
if(queue.empty())
|
||||
continue;
|
||||
|
||||
|
@ -582,6 +585,17 @@ try
|
|||
|
||||
return false;
|
||||
}
|
||||
catch(const std::system_error &e)
|
||||
{
|
||||
log::derror
|
||||
{
|
||||
log, "longpoll %s failed :%s",
|
||||
loghead(data),
|
||||
e.what()
|
||||
};
|
||||
|
||||
throw;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::error
|
||||
|
|
Loading…
Reference in a new issue