From 9c1d2fad7836d7ed1ed48f9306c6d69790fcf4c8 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 22 Jun 2020 20:39:18 -0700 Subject: [PATCH] scope buildNewOnionPathsWorker call properly --- js/modules/loki_snode_api.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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() {