add escape hatch for very slow connections

This commit is contained in:
Damien Elmes 2020-08-26 18:44:20 +10:00
parent 06e00be985
commit 07151faae8

View File

@ -80,12 +80,17 @@ pub struct Timeouts {
impl Timeouts {
pub fn new() -> Self {
let io_secs = if std::env::var("LONG_IO_TIMEOUT").is_ok() {
3600
} else {
300
};
Timeouts {
connect_secs: 30,
/// This is smaller than the I/O limit because it is just a
/// default - some longer-running requests override it.
request_secs: 60,
io_secs: 300,
io_secs,
}
}
}