Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1ac7769 authored by Alon Albert's avatar Alon Albert
Browse files

Apply backoff to operation that caused it

Change-Id: I4f0c9598f031fc7c440071db14eca40094956afb
parent de33dd7c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -728,10 +728,16 @@ public class SyncManager implements OnAccountsUpdateListener {
            newDelayInMs = maxSyncRetryTimeInSeconds * 1000;
        }

        final long backoff = now + newDelayInMs;

        mSyncStorageEngine.setBackoff(op.account, op.authority,
                now + newDelayInMs, newDelayInMs);
                backoff, newDelayInMs);

        op.backoff = backoff;
        op.updateEffectiveRunTime();

        synchronized (mSyncQueue) {
            mSyncQueue.onBackoffChanged(op.account, op.authority, now + newDelayInMs);
            mSyncQueue.onBackoffChanged(op.account, op.authority, backoff);
        }
    }