0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +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
{
one_time_key_counts, algorithm, json::value
{
0L //count TODO: XXX
}
one_time_key_counts, algorithm, json::value{count}
};
}
}
// Prevents an infinite loop due to a race in riot
if(!counts.empty())
sleep(seconds(2));
return resource::response
{
client, json::object(out.completed())