use retry routine with force retry
This commit is contained in:
parent
a26c00e03a
commit
1ec1ec8b7c
1 changed files with 9 additions and 5 deletions
|
|
@ -202,11 +202,15 @@ const successfulHandshakeAlreadyExists = async recipientPub => {
|
|||
* @returns {Promise<string|null>}
|
||||
*/
|
||||
const recipientToOutgoingID = async recipientPub => {
|
||||
const maybeEncryptedOutgoingID = await require('../../Mediator/index')
|
||||
.getUser()
|
||||
const maybeEncryptedOutgoingID = await tryAndWait(
|
||||
(_, user) =>
|
||||
user
|
||||
.get(Key.RECIPIENT_TO_OUTGOING)
|
||||
.get(recipientPub)
|
||||
.then()
|
||||
.then(),
|
||||
// force retry in case undefined is a false negative
|
||||
v => typeof v === 'undefined'
|
||||
)
|
||||
|
||||
if (typeof maybeEncryptedOutgoingID === 'string') {
|
||||
const outgoingID = await require('../../Mediator/index').mySEA.decrypt(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue