Turn Unit into a built Request (#223)
This involved removing the Request reference from Unit, and adding an Agent, a method, and headers. Also, move is_retryable to Unit.
This commit is contained in:
committed by
GitHub
parent
acc36ac370
commit
ec8dace1af
@@ -266,7 +266,7 @@ impl Response {
|
||||
let stream = self.stream.expect("No reader in response?!");
|
||||
let unit = self.unit;
|
||||
if let Some(unit) = &unit {
|
||||
let result = stream.set_read_timeout(unit.req.agent.config.timeout_read);
|
||||
let result = stream.set_read_timeout(unit.agent.config.timeout_read);
|
||||
if let Err(e) = result {
|
||||
return Box::new(ErrorReader(e)) as Box<dyn Read + Send>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user