fix dispose issue on read

This commit is contained in:
Fabian Freund
2025-07-27 15:35:06 +02:00
parent 0364cbe7ff
commit ebf0500f29
3 changed files with 8 additions and 4 deletions
@@ -81,6 +81,8 @@ Future<WebPageInfo> pageInfo(
Uri url, {
required bool isImageRequest,
}) async {
final link = ref.cacheFor(const Duration(minutes: 2));
final tabId = ref.read(selectedTabProvider);
int? proxyPort;
@@ -112,8 +114,8 @@ Future<WebPageInfo> pageInfo(
proxyPort: proxyPort,
);
if (result.isSuccess) {
ref.cacheFor(const Duration(minutes: 2));
if (!result.isSuccess) {
link.close();
}
return result.value;