From fab6e66439011a0d5587dc0e93142fd940358416 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Tue, 4 Feb 2020 18:26:07 -0400 Subject: [PATCH] tweak debounce time --- services/gunDB/Mediator/index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index 938dbaa7..183a921d 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -921,20 +921,14 @@ class Mediator { await throwOnInvalidToken(token) - await API.Events.onSimplerSentRequests( + API.Events.onSimplerSentRequests( debounce(sentRequests => { - if (Config.SHOW_LOG) { - console.log('---sentRequests---') - console.log(sentRequests) - console.log('-----------------------') - } - this.socket.emit(Event.ON_SENT_REQUESTS, { msg: sentRequests, ok: true, origBody: body }) - }, 200) + }, 1000) ) } catch (err) { console.log(err)