update:将垃圾回收放置ws关闭处,避免频繁操作

This commit is contained in:
hrz
2025-11-25 16:11:48 +08:00
parent 3f6e66b1ce
commit 4645c50f6d
9 changed files with 3 additions and 8 deletions
+3
View File
@@ -1127,6 +1127,9 @@ class ConnectionHandler:
)
self.executor = None
import gc
gc.collect()
self.logger.bind(tag=TAG).info("连接资源已释放")
except Exception as e:
self.logger.bind(tag=TAG).error(f"关闭连接时出错: {e}")