0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

modules/media/media: Fix condition variable.

modules/media/media: Minor cleanup.
This commit is contained in:
Jason Volk 2019-07-05 16:41:56 -07:00
parent b8dfa9ccee
commit f48182404f

View file

@ -188,11 +188,11 @@ try
if(!iit.second) if(!iit.second)
{ {
do downloading_dock.wait([&room_id]
{ {
downloading_dock.wait(); return !downloading.count(room_id);
} });
while(downloading.count(room_id));
return room_id; return room_id;
} }
@ -420,9 +420,9 @@ read_each_block(const m::room &room,
if(at<"type"_>(event) != "ircd.file.block") if(at<"type"_>(event) != "ircd.file.block")
continue; continue;
const auto &hash const json::string &hash
{ {
unquote(at<"content"_>(event).at("hash")) at<"content"_>(event).at("hash")
}; };
const auto &blksz const auto &blksz