fix: 登录冷却期间不再显示 CTP 连接中,优化前端状态同步

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-25 16:57:06 +08:00
parent 4aebc2df49
commit 9c8b92d2bd
4 changed files with 77 additions and 14 deletions
+5 -1
View File
@@ -47,7 +47,11 @@ def start_ctp_premarket_connect_worker(
):
mode = get_mode_fn()
st = ctp_status(mode)
if not st.get("connected") and not st.get("connecting"):
if (
not st.get("connected")
and not st.get("connecting")
and int(st.get("login_cooldown_sec") or 0) <= 0
):
info = ctp_start_connect(mode, force=False)
if info.get("started"):
logger.info(