mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04: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