diff --git a/modules/client/keys/upload.cc b/modules/client/keys/upload.cc index 612cd88fc..23ddf7b2f 100644 --- a/modules/client/keys/upload.cc +++ b/modules/client/keys/upload.cc @@ -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())