0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-15 17:16:49 +01:00

modules/client/keys/upload: Workaround race condition in Riot. (Fixes #9)

This commit is contained in:
Jason Volk 2019-08-06 19:30:09 -07:00
parent d78a1bfe6f
commit 87ce85e521

View file

@ -144,14 +144,15 @@ post__keys_upload(client &client,
{ {
json::stack::member json::stack::member
{ {
one_time_key_counts, algorithm, json::value one_time_key_counts, algorithm, json::value{count}
{
0L //count TODO: XXX
}
}; };
} }
} }
// Prevents an infinite loop due to a race in riot
if(!counts.empty())
sleep(seconds(2));
return resource::response return resource::response
{ {
client, json::object(out.completed()) client, json::object(out.completed())