mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-17 19:54:35 -05:00
check if trade shut down started within lock
This commit is contained in:
parent
33bd4587c4
commit
2a2eb0c82f
@ -54,11 +54,9 @@ public class BuyerProtocol extends DisputeProtocol {
|
|||||||
protected void onInitialized() {
|
protected void onInitialized() {
|
||||||
super.onInitialized();
|
super.onInitialized();
|
||||||
|
|
||||||
// done if shut down
|
|
||||||
if (trade.isShutDown()) return;
|
|
||||||
|
|
||||||
// re-send payment sent message if not acked
|
// re-send payment sent message if not acked
|
||||||
synchronized (trade) {
|
synchronized (trade) {
|
||||||
|
if (trade.isShutDownStarted()) return;
|
||||||
if (trade.getState().ordinal() >= Trade.State.BUYER_SENT_PAYMENT_SENT_MSG.ordinal() && trade.getState().ordinal() < Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG.ordinal()) {
|
if (trade.getState().ordinal() >= Trade.State.BUYER_SENT_PAYMENT_SENT_MSG.ordinal() && trade.getState().ordinal() < Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG.ordinal()) {
|
||||||
latchTrade();
|
latchTrade();
|
||||||
given(anyPhase(Trade.Phase.PAYMENT_SENT)
|
given(anyPhase(Trade.Phase.PAYMENT_SENT)
|
||||||
|
@ -50,11 +50,9 @@ public class SellerProtocol extends DisputeProtocol {
|
|||||||
protected void onInitialized() {
|
protected void onInitialized() {
|
||||||
super.onInitialized();
|
super.onInitialized();
|
||||||
|
|
||||||
// done if shut down
|
|
||||||
if (trade.isShutDown()) return;
|
|
||||||
|
|
||||||
// re-send payment received message if payout not published
|
// re-send payment received message if payout not published
|
||||||
synchronized (trade) {
|
synchronized (trade) {
|
||||||
|
if (trade.isShutDownStarted()) return;
|
||||||
if (trade.getState().ordinal() >= Trade.State.SELLER_SENT_PAYMENT_RECEIVED_MSG.ordinal() && !trade.isPayoutPublished()) {
|
if (trade.getState().ordinal() >= Trade.State.SELLER_SENT_PAYMENT_RECEIVED_MSG.ordinal() && !trade.isPayoutPublished()) {
|
||||||
latchTrade();
|
latchTrade();
|
||||||
given(anyPhase(Trade.Phase.PAYMENT_RECEIVED)
|
given(anyPhase(Trade.Phase.PAYMENT_RECEIVED)
|
||||||
|
Loading…
Reference in New Issue
Block a user