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.
This commit is contained in:
Imran Remtulla
2026-07-06 03:26:17 +01:00
parent 44d2b8c9b6
commit 99ffbc9cd2

View File

@@ -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;