fix dispose issue on read
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'website_title.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$pageInfoHash() => r'46eec6236555d37b5bbb4d8d887c5ee6ee0336e3';
|
||||
String _$pageInfoHash() => r'53380fbf9c67d494944330641cefbde9455cdb60';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
||||
Reference in New Issue
Block a user