From 538276f22eb75331aee2c5d7effcbf2d8ccc8988 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 18 Apr 2020 00:38:40 -0400 Subject: drop timeout due to tokio limitations --- src/bin/rbw-agent/agent.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- cgit v1.2.3-54-g00ecf