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:
parent
d78a1bfe6f
commit
87ce85e521
1 changed files with 5 additions and 4 deletions
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue