Closed kornelski closed 1 year ago
Leaving this here in case someone runs into the same issue as me. I was using (maybe abusing) with_chunked_body
to simulate connection timeouts:
.with_chunked_body(|w| {
std::thread::sleep(std::time::Duration::from_millis(500));
w.write_all(b"data")
})
This no longer works due to this change, the connection is immediately accepted before even sending data. Changed it to with_body_from_request
to have a similar behavior as before:
.with_body_from_request(|_| {
std::thread::sleep(std::time::Duration::from_millis(500));
b"data".to_vec()
})
Fixes #175