parallel
This commit is contained in:
parent
b72604075f
commit
2eac1eaaf7
1 changed files with 51 additions and 49 deletions
|
|
@ -1061,7 +1061,8 @@ const disconnect = async pub => {
|
||||||
pub
|
pub
|
||||||
))
|
))
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
await Promise.all([
|
||||||
|
new Promise((res, rej) => {
|
||||||
user
|
user
|
||||||
.get(Key.USER_TO_INCOMING)
|
.get(Key.USER_TO_INCOMING)
|
||||||
.get(pub)
|
.get(pub)
|
||||||
|
|
@ -1072,9 +1073,9 @@ const disconnect = async pub => {
|
||||||
res()
|
res()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}),
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
user
|
user
|
||||||
.get(Key.RECIPIENT_TO_OUTGOING)
|
.get(Key.RECIPIENT_TO_OUTGOING)
|
||||||
.get(pub)
|
.get(pub)
|
||||||
|
|
@ -1085,9 +1086,9 @@ const disconnect = async pub => {
|
||||||
res()
|
res()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}),
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
user
|
user
|
||||||
.get(Key.USER_TO_LAST_REQUEST_SENT)
|
.get(Key.USER_TO_LAST_REQUEST_SENT)
|
||||||
.get(pub)
|
.get(pub)
|
||||||
|
|
@ -1098,9 +1099,9 @@ const disconnect = async pub => {
|
||||||
res()
|
res()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}),
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
user
|
user
|
||||||
.get(Key.OUTGOINGS)
|
.get(Key.OUTGOINGS)
|
||||||
.get(outGoingID)
|
.get(outGoingID)
|
||||||
|
|
@ -1111,9 +1112,10 @@ const disconnect = async pub => {
|
||||||
res()
|
res()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}),
|
||||||
|
|
||||||
await generateHandshakeAddress(require('../Mediator').getUser())
|
await generateHandshakeAddress(require('../Mediator').getUser())
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue