fix(tests): stabilize messaging shutdown (#5979)

This commit is contained in:
InfinityPacer
2026-06-21 07:37:47 +08:00
committed by GitHub
parent b395d820d8
commit e02cebe16c
15 changed files with 275 additions and 40 deletions

View File

@@ -264,6 +264,11 @@ class Feishu:
@staticmethod
async def _disconnect_ws_client_quietly(ws_client: lark.ws.Client) -> None:
"""静默关闭飞书 WebSocket避免 SDK 在关机时打印带敏感参数的连接地址。"""
if ws_client._conn is None:
ws_client._conn_url = ""
ws_client._conn_id = ""
ws_client._service_id = ""
return
await ws_client._lock.acquire()
try:
if ws_client._conn is not None: