From 785544c341de347af075385f847a7132bf2564a8 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Fri, 30 Apr 2021 15:46:19 -0400 Subject: [PATCH] Use map.on() over map.once() map.once() is eager and will serve empty/half-empty objects instead of waiting for the entirety of data to be wired in. --- services/gunDB/contact-api/jobs/onAcceptedRequests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/gunDB/contact-api/jobs/onAcceptedRequests.js b/services/gunDB/contact-api/jobs/onAcceptedRequests.js index 255cc107..b8a559f5 100644 --- a/services/gunDB/contact-api/jobs/onAcceptedRequests.js +++ b/services/gunDB/contact-api/jobs/onAcceptedRequests.js @@ -36,7 +36,7 @@ const onAcceptedRequests = (user, SEA) => { user .get(Key.STORED_REQS) .map() - .once(async (storedReq, id) => { + .on(async (storedReq, id) => { logger.info( `------------------------------------\nPROCID:${procid} (used for debugging memory leaks in jobs)\n---------------------------------------` )