scope buildNewOnionPathsWorker call properly

pull/1190/head
Ryan Tharp 5 years ago
parent 5678f40b9e
commit 9c1d2fad78

@ -488,10 +488,9 @@ class LokiSnodeAPI {
async buildNewOnionPaths() {
// this function may be called concurrently make sure we only have one inflight
return primitives.allowOnlyOneAtATime(
'buildNewOnionPaths',
this.buildNewOnionPathsWorker
);
return primitives.allowOnlyOneAtATime('buildNewOnionPaths', async () => {
await this.buildNewOnionPathsWorker();
});
}
async getRandomSnodeAddress() {

Loading…
Cancel
Save