combat clock skew
This commit is contained in:
parent
27db275622
commit
5cb228e87d
1 changed files with 6 additions and 0 deletions
|
|
@ -271,6 +271,9 @@ const authenticate = async (alias, pass, __user) => {
|
||||||
if (typeof ack.err === 'string') {
|
if (typeof ack.err === 'string') {
|
||||||
throw new Error(ack.err)
|
throw new Error(ack.err)
|
||||||
} else if (typeof ack.sea === 'object') {
|
} else if (typeof ack.sea === 'object') {
|
||||||
|
// clock skew
|
||||||
|
await new Promise(res => setTimeout(res, 2000))
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
_user.get(Key.FOLLOWS).put(
|
_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) => {
|
await new Promise((res, rej) => {
|
||||||
_user.get(Key.FOLLOWS).put(
|
_user.get(Key.FOLLOWS).put(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue