From 46c248012ecd1dd2cc717cce4c16b3f1bd24c6e9 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 16 Jul 2026 21:45:45 +0800
Subject: [PATCH] fix(gateApi): 修复网格交易中遗留订单取消逻辑

---
 src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
index 0dd3508..4402a94 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -398,7 +398,8 @@
             return;
         }
 
-        checkProfitAndReset();
+        // 异步检查盈亏,避免 REST 调用阻塞 WS 心跳导致 Socket closed
+        executor.submitTask(this::checkProfitAndReset);
 
         if (state == StrategyState.ACTIVE &&
                 longActive == false &&

--
Gitblit v1.9.1