mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-10 05:03:35 +01:00
fix npe syncing wallet normally for duration
This commit is contained in:
parent
6dc9842253
commit
e4e8f5d311
@ -836,7 +836,9 @@ public abstract class Trade implements Tradable, Model {
|
||||
// reset wallet refresh period after duration
|
||||
new Thread(() -> {
|
||||
GenUtils.waitFor(syncNormalDuration);
|
||||
if (!isShutDown && System.currentTimeMillis() >= syncNormalStartTimeMs + syncNormalDuration) {
|
||||
Long syncNormalStartTimeMsCopy = syncNormalStartTimeMs; // copy to avoid race condition
|
||||
if (syncNormalStartTimeMsCopy == null) return;
|
||||
if (!isShutDown && System.currentTimeMillis() >= syncNormalStartTimeMsCopy + syncNormalDuration) {
|
||||
syncNormalStartTimeMs = null;
|
||||
updateWalletRefreshPeriod();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user