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:
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
|
||||
{
|
||||
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())
|
||||
|
|
Loading…
Reference in a new issue