From 847ffe50be406d13fc3520483f44f345fb6c5120 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 17 Feb 2022 21:34:11 -0500 Subject: [PATCH] Shorter sleep. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6015ffc..263b75f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,8 @@ async fn main() -> Result<(), Box> { } launch_mpv().await?; - sleep(Duration::from_secs(10)).await; + // TODO: Figure out a better way to wait for the socket to exist and be connectable + sleep(Duration::from_secs(1)).await; let mut mpvctl = MpvCtl::connect("/tmp/recordwatchsocket").await?; mpvctl.get_client_name().await?;