mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 08:17:57 +00:00
fix possible concurrent modification exception
This commit is contained in:
parent
cebdef31c0
commit
4901808844
1 changed files with 15 additions and 16 deletions
|
@ -91,6 +91,7 @@ import javafx.collections.ObservableList;
|
|||
|
||||
import org.bouncycastle.crypto.params.KeyParameter;
|
||||
import org.fxmisc.easybind.EasyBind;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -881,8 +882,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
}
|
||||
|
||||
private void updateTradePeriodState() {
|
||||
UserThread.execute(() -> { // prevent concurrent modification error
|
||||
getObservableList().forEach(trade -> {
|
||||
for (Trade trade : new ArrayList<Trade>(tradableList.getList())) {
|
||||
if (!trade.isPayoutPublished()) {
|
||||
Date maxTradePeriodDate = trade.getMaxTradePeriodDate();
|
||||
Date halfTradePeriodDate = trade.getHalfTradePeriodDate();
|
||||
|
@ -897,8 +897,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue