dio
dio copied to clipboard
'DioError [DioErrorType.connectTimeout]: Connecting timed out [20000ms]'
报错量非常多,咋整?
CONNECT_TIMEOUT too many times。
used package Dio 4.0.4, but still the same.
https://github.com/flutterchina/dio/issues/975
any updates?
Same here sometime this timeout error appear internet is good why?
Same here sometime this timeout error appear internet is good too pls help
I temporarily used this library to fix my api issues https://pub.dev/packages/retry whenever there is timeout
@balaji101010 how did you implement this package? I only want to retry on Dio Timeout, in all other cases it should be handled by the _handleException method. I doubt if I need to await the .get method? I assume it's not needed, in the source code of the package I see the fn will be awaited.
try {
return await retry(
() => _getHttpClient().get(url, queryParameters: queryParameters),
maxAttempts: 3,
retryIf: (e) => e is DioError && e.type == DioErrorType.connectTimeout,
);
} catch (e) {
_handleException(e);
}
一直有这个问题