Don't block thread when retrying.

This commit is contained in:
Mikunj 2019-11-01 15:49:26 +11:00
parent 789aa244b5
commit c223e087f6
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ fun signAndSendPairingAuthorisationMessage(context: Context, pairingAuthorisatio
return
}
retryIfNeeded(8) {
sendPairingAuthorisationMessage(context, pairingAuthorisation.secondaryDevicePublicKey, signedPairingAuthorisation).get()
sendPairingAuthorisationMessage(context, pairingAuthorisation.secondaryDevicePublicKey, signedPairingAuthorisation)
}.fail {
Log.d("Loki", "Failed to send pairing authorization message to ${pairingAuthorisation.secondaryDevicePublicKey}.")
}

View File

@ -203,7 +203,7 @@ class SeedActivity : BaseActionBarActivity(), DeviceLinkingDialogDelegate {
application.setUpStorageAPIIfNeeded()
DeviceLinkingDialog.show(this, DeviceLinkingView.Mode.Slave, this)
retryIfNeeded(8) {
sendPairingAuthorisationMessage(this@SeedActivity, authorisation.primaryDevicePublicKey, authorisation).get()
sendPairingAuthorisationMessage(this@SeedActivity, authorisation.primaryDevicePublicKey, authorisation)
}
} else {
startActivity(Intent(this, DisplayNameActivity::class.java))