-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
dio https connect can not keep Alive? #2106
Comments
每发一次请求,Client Address的端口值都会变。 能帮我看一下,在dio中如何能 保持持久连接么?每次请求不需要重新进行 TLS 握手。 |
I also encountered the same problem |
same here |
how to fix |
is this a new issue? |
I solve this by the following code: |
thanks, but i don't know if it really works, how can i test it ? |
use flutter devtools --> network tab, check the connection establish time. |
|
This is why keep-alive not working. The default dio/dio/lib/src/adapters/io_adapter.dart Line 242 in cca8439
|
The |
In order to get rid of the default 3 seconds timeout, either create a new |
Package
dio
Version
5.4.0
Operating-System
iOS
Output of
flutter doctor -v
Dart Version
3.10.0
Steps to Reproduce
use dio package to request, every request need TLS shakehand, I expected : use persistence connect, not every time need TLS shake hand
@OverRide
void initState() {
// TODO: implement initState
super.initState();
}
void _incrementCounter() async {
var response = await _dio.post("https://qa-xxxxxxxxxxxxxx/article/merchant/operate" ,data: {
"type": 7,
"articleId":9850245
},options: Options()..persistentConnection = true);
print(response);
}
Expected Result
kept Alive : true
TLS handshake : -
https 连接能持久连接, 不需要每次都TLS 握手
Actual Result
The text was updated successfully, but these errors were encountered: