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
reqwest::blocking::ClientBuilder does not have a function tcp_keepalive() #1098
Comments
It looks like the option wasn't added to the |
I'm having a similar problem on NetBSD 9. I'm using the
|
@rneswold can we see an example of your code ? |
if let Err(e) = bridge.set_light_state(light, &state) {
warn!("light {} : error {:?} sending state {:?}", light, e, state)
}
I haven't tried a non-released version. Is there an easy way to do that with |
Sorry about the breakage. The problem comes from reqwest defaulting to setting TCP_KEEPALIVE starting in release 0.10.9, and hyper's HttpConnector fails the connection if an option is unavailable. So, here's my plan:
|
Reverting the default is in a PR here: #1113 The actual title of this issue is related to a missing method, which was already fixed on master, so I'm going to close here. |
Not a problem. Thanks for being so responsive. |
should fix crashes on platforms where tcp_keepalive is not allowed (e.g. openbsd) see also: - seanmonstar/reqwest#1113 - seanmonstar/reqwest#1098
HI,
On the current version 0.10.9 I have a windows baset reqwest client connecting is return a weird error, which it was not in v0.10.8. I have setup the client to be reused on multiple requests to the server.
thread '' panicked at 'called
Result::unwrap()
on anErr
value: reqwest::Error { kind: Request, url: Url { scheme: "http", host: Some(Ipv4(127.0.0.1)), port: Some(1234), path: "/some_path", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("tcp set_keepalive error", Os { code: 0, kind: Other, message: "Success." })) }'I am trying to use the blocking client builder to add the tcp keepalive timeout. However it does not have one available.
From the change log it seems like it was an added feature in 0.10.9.
I am happy to help with a PR if you want me to have a go at adding this to reqwest. Please let me know.
Thanks.
The text was updated successfully, but these errors were encountered: