0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 23:40:57 +01:00

modules/client/sync: Check if the client is still alive during longpoll.

This commit is contained in:
Jason Volk 2019-03-12 14:32:58 -07:00
parent 38f7d61020
commit f745787ce4

View file

@ -558,6 +558,9 @@ try
if(!dock.wait_until(args.timesout)) if(!dock.wait_until(args.timesout))
break; break;
assert(data.client && data.client->sock);
check(*data.client->sock);
if(queue.empty()) if(queue.empty())
continue; continue;
@ -582,6 +585,17 @@ try
return false; 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) catch(const std::exception &e)
{ {
log::error log::error