fix: 登录冷却期间不再显示 CTP 连接中,优化前端状态同步
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-1
@@ -251,10 +251,12 @@ class CtpBridge:
|
||||
self.ping()
|
||||
st = _setting_for_mode(mode)
|
||||
missing = [k for k in ("用户名", "密码", "交易服务器") if not st.get(k)]
|
||||
cooldown = self.login_cooldown_remaining()
|
||||
connecting = bool(self._connect_in_progress and cooldown <= 0)
|
||||
return {
|
||||
"vnpy_installed": self.available(),
|
||||
"connected": self._connected_mode == mode,
|
||||
"connecting": self._connect_in_progress,
|
||||
"connecting": connecting,
|
||||
"connected_mode": self._connected_mode,
|
||||
"mode_label": _mode_label(mode),
|
||||
"missing_config": missing,
|
||||
|
||||
Reference in New Issue
Block a user