diff --git a/js/modules/loki_snode_api.js b/js/modules/loki_snode_api.js index b9d4ffa32..e6247c828 100644 --- a/js/modules/loki_snode_api.js +++ b/js/modules/loki_snode_api.js @@ -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() {