aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-18 00:38:40 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-18 00:39:35 -0400
commit538276f22eb75331aee2c5d7effcbf2d8ccc8988 (patch)
treec7aab2ebc15bc1a6ba36f5d36d3d8a9921495ce8
parent100411d6fe1d19e9169e606e85edd11927326570 (diff)
downloadrbw-538276f22eb75331aee2c5d7effcbf2d8ccc8988.tar.gz
rbw-538276f22eb75331aee2c5d7effcbf2d8ccc8988.zip
drop timeout due to tokio limitations
-rw-r--r--src/bin/rbw-agent/agent.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/rbw-agent/agent.rs b/src/bin/rbw-agent/agent.rs
index 3060bec..21600c3 100644
--- a/src/bin/rbw-agent/agent.rs
+++ b/src/bin/rbw-agent/agent.rs
@@ -66,8 +66,9 @@ impl Agent {
&mut self,
mut listener: tokio::net::UnixListener,
) -> anyhow::Result<()> {
+ // tokio only supports timeouts up to 2^36 milliseconds
let mut forever = tokio::time::delay_for(
- tokio::time::Duration::from_secs(999_999_999),
+ tokio::time::Duration::from_secs(60 * 60 * 24 * 365 * 2),
);
loop {
let timeout = if let Some(timeout) = &mut self.timeout {