SecretStore: fixed Ordering

This commit is contained in:
Svyatoslav Nikolsky 2017-11-20 15:59:23 +03:00
parent 3945a29ee6
commit 01d6532875

View File

@ -364,9 +364,9 @@ impl ChainNotify for ServiceContractListener {
// schedule retry if received enough blocks since last retry // schedule retry if received enough blocks since last retry
// it maybe inaccurate when switching syncing/synced states, but that's ok // it maybe inaccurate when switching syncing/synced states, but that's ok
if self.data.last_retry.fetch_add(enacted_len, Ordering::AcqRel) >= RETRY_INTEVAL_BLOCKS { if self.data.last_retry.fetch_add(enacted_len, Ordering::Relaxed) >= RETRY_INTEVAL_BLOCKS {
self.data.tasks_queue.push(::std::iter::once(ServiceTask::Retry)); self.data.tasks_queue.push(::std::iter::once(ServiceTask::Retry));
self.data.last_retry.store(0, Ordering::AcqRel); self.data.last_retry.store(0, Ordering::Relaxed);
} }
} }
} }