mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 00:07:49 +00:00
fix npe syncing wallet normally for duration
This commit is contained in:
parent
6dc9842253
commit
e4e8f5d311
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue