From 96613fc35aefa1cc56d865c27367229344505287 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sat, 27 Jun 2020 23:35:53 -0400 Subject: [PATCH] combat clock skew --- services/gunDB/Mediator/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index 0d164beb..46435035 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -271,6 +271,9 @@ const authenticate = async (alias, pass, __user) => { if (typeof ack.err === 'string') { throw new Error(ack.err) } else if (typeof ack.sea === 'object') { + // clock skew + await new Promise(res => setTimeout(res, 2000)) + await new Promise((res, rej) => { _user.get(Key.FOLLOWS).put( { @@ -299,6 +302,9 @@ const authenticate = async (alias, pass, __user) => { ) } + // clock skew + await new Promise(res => setTimeout(res, 2000)) + await new Promise((res, rej) => { _user.get(Key.FOLLOWS).put( {