privateconstvalNEXT_RETRY_MULTIPLIER:Float=1.2f// If we fail to poll we multiply our current retry interval by this (up to the above max) then try again
}
// endregion
@ -59,7 +60,7 @@ class Poller(
if(hasStarted){return}
Log.d(TAG,"Started polling.")
hasStarted=true
setUpPolling(retryInterval)
setUpPolling(RETRY_INTERVAL_MS)
}
funstopIfNeeded(){
@ -72,11 +73,11 @@ class Poller(
Log.d(TAG,"Retrieving user profile. for key = $userPublicKey")
SnodeAPI.getSwarm(userPublicKey).bind{
usedSnodes.clear()
deferred<Unit,Exception>().also{
pollNextSnode(userProfileOnly=true,it)
deferred<Unit,Exception>().also{exception->
pollNextSnode(userProfileOnly=true,exception)
}.promise
}.fail{
Log.e(TAG,"Failed to retrieve user profile.",it)
}.fail{exception->
Log.e(TAG,"Failed to retrieve user profile.",exception)