This commit is contained in:
Nikolay Kim 2025-01-15 17:12:24 +05:00
parent df25fd1bb5
commit b38921f555
2 changed files with 9 additions and 5 deletions

View file

@ -83,8 +83,12 @@ mod test {
#[ntex_macros::rt_test2]
async fn on_drop() {
let mut dropped = false;
let f = OnDropFn::new(|| ());
assert!(format!("{:?}", f).contains("OnDropFn"));
f.cancel();
assert!(f.f.get().is_none());
let mut dropped = false;
let mut f = pending::<()>().on_drop(|| {
dropped = true;
});

View file

@ -717,8 +717,8 @@ where
.map_err(|e| log::error!("Cannot set alpn protocol: {:?}", e));
Connector::default()
.lifetime(Seconds::ZERO)
.keep_alive(Seconds(45))
.timeout(Millis(45_000))
.keep_alive(Seconds(60))
.timeout(Millis(60_000))
.disconnect_timeout(Seconds(5))
.openssl(builder.build())
.finish()
@ -727,14 +727,14 @@ where
{
Connector::default()
.lifetime(Seconds::ZERO)
.timeout(Millis(45_000))
.timeout(Millis(60_000))
.finish()
}
};
Client::build()
.connector(connector)
.timeout(Seconds(45))
.timeout(Seconds(60))
.finish()
};