Skip to content

Commit 2b08ad6

Browse files
committed
Only clear pool for one connection
1 parent a87211b commit 2b08ad6

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ ORDER BY b.width DESC
192192
Log.Exception($"Failed to extract bookmark favicon: {bookmark.Url}", ex);
193193
}
194194
}
195+
196+
// https://github.com/dotnet/efcore/issues/26580
197+
SqliteConnection.ClearPool(connection);
195198
}
196199
catch (Exception ex)
197200
{
@@ -201,8 +204,6 @@ ORDER BY b.width DESC
201204
// Delete temporary file
202205
try
203206
{
204-
// https://github.com/dotnet/efcore/issues/26580
205-
SqliteConnection.ClearAllPools();
206207
File.Delete(tempDbPath);
207208
}
208209
catch (Exception ex)

Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ protected List<Bookmark> GetBookmarksFromPath(string placesPath)
8383
LoadFaviconsFromDb(faviconDbPath, bookmarks);
8484
}
8585

86+
// https://github.com/dotnet/efcore/issues/26580
87+
SqliteConnection.ClearPool(dbConnection);
88+
8689
// Delete temporary file
8790
try
8891
{
89-
// https://github.com/dotnet/efcore/issues/26580
90-
SqliteConnection.ClearAllPools();
9192
File.Delete(tempDbPath);
9293
}
9394
catch (Exception ex)
@@ -165,13 +166,14 @@ ORDER BY i.width DESC -- Select largest icon available
165166
{
166167
Log.Exception($"Failed to extract Firefox favicon: {bookmark.Url}", ex);
167168
}
169+
170+
// https://github.com/dotnet/efcore/issues/26580
171+
SqliteConnection.ClearPool(connection);
168172
}
169173

170174
// Delete temporary file
171175
try
172176
{
173-
// https://github.com/dotnet/efcore/issues/26580
174-
SqliteConnection.ClearAllPools();
175177
File.Delete(tempDbPath);
176178
}
177179
catch (Exception ex)

0 commit comments

Comments
 (0)