Only clear pool for one connection

This commit is contained in:
Jack251970 2025-03-20 16:21:15 +08:00
parent a87211bfb4
commit 2b08ad65a0
2 changed files with 9 additions and 6 deletions

View file

@ -192,6 +192,9 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
Log.Exception($"Failed to extract bookmark favicon: {bookmark.Url}", ex);
}
}
// https://github.com/dotnet/efcore/issues/26580
SqliteConnection.ClearPool(connection);
}
catch (Exception ex)
{
@ -201,8 +204,6 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
// Delete temporary file
try
{
// https://github.com/dotnet/efcore/issues/26580
SqliteConnection.ClearAllPools();
File.Delete(tempDbPath);
}
catch (Exception ex)

View file

@ -83,11 +83,12 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
LoadFaviconsFromDb(faviconDbPath, bookmarks);
}
// https://github.com/dotnet/efcore/issues/26580
SqliteConnection.ClearPool(dbConnection);
// Delete temporary file
try
{
// https://github.com/dotnet/efcore/issues/26580
SqliteConnection.ClearAllPools();
File.Delete(tempDbPath);
}
catch (Exception ex)
@ -165,13 +166,14 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
{
Log.Exception($"Failed to extract Firefox favicon: {bookmark.Url}", ex);
}
// https://github.com/dotnet/efcore/issues/26580
SqliteConnection.ClearPool(connection);
}
// Delete temporary file
try
{
// https://github.com/dotnet/efcore/issues/26580
SqliteConnection.ClearAllPools();
File.Delete(tempDbPath);
}
catch (Exception ex)