dio
dio copied to clipboard
Http2 Adapter : http client ko after airplane mode use
New Issue Checklist
- [x] I have searched for a similar issue in the project and found none
Issue Info
Info | Value | |
---|---|---|
Platform Name | ios | |
Platform Version | flutter 2.8.0 | |
Dio Version | 4.0.4 | |
Android Studio / Xcode Version | e.g. Android Studio 3.3.2 / Xcode 10.2.1 | |
Repro rate | e.g. all the time (100%) / sometimes x% / only once | |
Repro with our demo prj | e.g. does it happen with our demo project? | |
Demo project link | e.g. link to a demo project that highlights the issue |
Issue Description and Steps
When I switch phone to airplane mode on an Ios device with http2 Dio Adapter, http client is broken and can never send a new request :
Unhandled Exception: SocketException: Failed host lookup: 'www.google.fr' (OS Error: nodename nor servname provided, or not known, errno = 8) #0 _NativeSocket.startConnect (dart:io-patch/socket_patch.dart:677:35) #1 _NativeSocket.connect (dart:io-patch/socket_patch.dart:914:12) #2 _RawSocket.connect (dart:io-patch/socket_patch.dart:1668:26) #3 RawSocket.connect (dart:io-patch/socket_patch.dart:21:23) #4 RawSecureSocket.connect (dart:io/secure_socket.dart:222:22) #5 SecureSocket.connect (dart:io/secure_socket.dart:45:28) #6 _ConnectionManager._connect (package:dio_http2_adapter/src/connection_manager_imp.dart:71:35) #7 _ConnectionManager.getConnection (package:dio_http2_adapter/src/connection_manager_imp.dart:41:49)
Does it work without the HTTP2 adapter?
Hello :) yes without http2 it works
and https works great on android
I have the same problem
This is still there, checked with version dio: 5.0.1
, dio_http2_adapter: 2.1.0
.