优化连接池

This commit is contained in:
2026-04-20 11:16:59 +08:00
parent 8a61b56389
commit bd1ddfb0e7
4 changed files with 30 additions and 13 deletions
@@ -235,7 +235,12 @@ namespace BLL
{
if (BLL.Funs.DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId))
{
BLL.Funs.DBList.Remove(System.Threading.Thread.CurrentThread.ManagedThreadId);
Model.SGGLDB db;
BLL.Funs.DBList.TryRemove(System.Threading.Thread.CurrentThread.ManagedThreadId,out db);
if (db != null)
{
db.Dispose();
}
}
}
}