fix: 修复ws断开时后端无法正常关闭

This commit is contained in:
DLmaster361
2025-08-27 18:35:50 +08:00
parent af402330b2
commit bce9777eae
3 changed files with 38 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
import re
import shutil
import asyncio
import uvicorn
import sqlite3
import calendar
import requests
@@ -584,6 +585,7 @@ class AppConfig(GlobalConfig):
self.config_path.mkdir(parents=True, exist_ok=True)
self.history_path.mkdir(parents=True, exist_ok=True)
self.server: Optional[uvicorn.Server] = None
self.websocket: Optional[WebSocket] = None
self.silence_dict: Dict[Path, datetime] = {}
self.if_ignore_silence: List[uuid.UUID] = []