add escape hatch for very slow connections
This commit is contained in:
parent
06e00be985
commit
07151faae8
@ -80,12 +80,17 @@ pub struct Timeouts {
|
|||||||
|
|
||||||
impl Timeouts {
|
impl Timeouts {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
|
let io_secs = if std::env::var("LONG_IO_TIMEOUT").is_ok() {
|
||||||
|
3600
|
||||||
|
} else {
|
||||||
|
300
|
||||||
|
};
|
||||||
Timeouts {
|
Timeouts {
|
||||||
connect_secs: 30,
|
connect_secs: 30,
|
||||||
/// This is smaller than the I/O limit because it is just a
|
/// This is smaller than the I/O limit because it is just a
|
||||||
/// default - some longer-running requests override it.
|
/// default - some longer-running requests override it.
|
||||||
request_secs: 60,
|
request_secs: 60,
|
||||||
io_secs: 300,
|
io_secs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user