Closed glademiller closed 7 years ago
Verified that I was unable to reproduce this on Linux.
I minimized the error case down to. This may be an issue for another project tokio-core or futures.
extern crate tokio_core;
extern crate tokio_curl;
extern crate futures;
extern crate curl;
use tokio_core::reactor::Core;
use curl::easy::Easy;
use tokio_curl::Session;
use futures::Future;
fn main() {
let mut lp = Core::new().unwrap();
let session = Session::new(lp.handle());
let mut req = Easy::new();
req.custom_request("GET").unwrap();
req.url("https://www.rust-lang.org").unwrap();
let res = session.perform(req)
.map(|mut resp| {
let status_code = resp.response_code().ok().unwrap_or(0);
println!("{}", status_code);
});
}
Thanks for the report! Looks like this was indeed a Windows-specific problem to this library due to a typo in https://github.com/tokio-rs/tokio-curl/commit/78f6d5d933eb9ffee58e45177710e466673be9ba. Should be fixed now though!
Thank you for the quick fix.
nightly-x86_64-pc-windows-msvc (default) rustc 1.15.0-nightly (8f02c429a 2016-12-15)
The following code snippet will run and the program will fail to exit about every other run if not more.