From 99ffbc9cd2e7f5c8a124413e6cd2e65fe982a545 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Mon, 6 Jul 2026 03:26:17 +0100 Subject: [PATCH] fix(http): remove connectionTimeout from HttpClient creation HttpService.createHttpClient set connectionTimeout: 30s on every HttpClient. In the background isolate on real Android devices, DNS resolution can exceed this when the network stack is cold, causing 'SocketException: Failed host lookup' on every background update check. Restore main's behavior of no timeout (null), which allows DNS to resolve at the system's pace. --- lib/providers/source_provider.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 6f736fff..f1923982 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -1248,11 +1248,9 @@ class TypedSettings { class HttpService { static const int maxRedirects = 10; - static const Duration connectionTimeout = Duration(seconds: 30); HttpClient createHttpClient(bool insecure) { final client = HttpClient(); - client.connectionTimeout = connectionTimeout; if (insecure) { client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;