Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

手机网络跟WiFi能否同时使用? #1293

Closed
zKidor opened this issue Oct 11, 2021 · 2 comments
Closed

手机网络跟WiFi能否同时使用? #1293

zKidor opened this issue Oct 11, 2021 · 2 comments

Comments

@zKidor
Copy link

zKidor commented Oct 11, 2021

Info Value
Platform Name flutter android
Platform Version flutter 2.5.2 android 10.0
Dio Version 4.0.0
Repro rate all the time (100%)
Repro with our demo prj it happen with the demo project

Issue Description and Steps

使用场景:
WiFi连接的是内网(与互联网不通),另外还有一个手机网络4G

1.当只连接手机网络时,发送请求可以成功返回

2.当连接WiFi且手机网络也启用时,这时使用手机浏览器是可以正常打开网页。使用demo APP发送请求失败,日志如下
I/flutter (11911): DioError [DioErrorType.other]: SocketException: Failed host lookup: 'httpbin.org' (OS Error: No address associated with hostname, errno = 7)
I/flutter (11911): #0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:818:20)
I/flutter (11911): #1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678:13)
I/flutter (11911):
I/flutter (11911): #2 DioMixin.fetch.. (package:dio/src/dio_mixin.dart)
I/flutter (11911):

请问,dio是否有相关的设置同时使用WiFi和手机网络,以上问题是否有解决方法,谢谢!

@wendux
Copy link
Contributor

wendux commented Oct 31, 2021

httpbin.org 国内访问需要梯子

@wendux wendux closed this as completed Nov 28, 2021
@zhangyibo007
Copy link

怎么解决的呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants