Merge pull request #99 from shocknet/clock-skew-hotfix

combat clock skew
This commit is contained in:
Daniel Lugo 2020-06-28 00:01:38 -04:00 committed by GitHub
commit be7eb2c46e

View file

@ -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(
{