mirror of
https://github.com/ImranR98/Obtainium.git
synced 2026-07-31 09:26:48 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user