diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-05-03 03:30:59 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-05-03 03:30:59 -0400 |
commit | 6ebf7d55e4c553870306a70092cfb677c17429b9 (patch) | |
tree | 2d20288e44fa627159d0a4e578f0fb506d16f921 /src/bin/rbw-agent/sock.rs | |
parent | 36b5107239b75136ce74799d87a645e153d95948 (diff) | |
download | rbw-6ebf7d55e4c553870306a70092cfb677c17429b9.tar.gz rbw-6ebf7d55e4c553870306a70092cfb677c17429b9.zip |
simplify
Diffstat (limited to 'src/bin/rbw-agent/sock.rs')
-rw-r--r-- | src/bin/rbw-agent/sock.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bin/rbw-agent/sock.rs b/src/bin/rbw-agent/sock.rs index bb2d6fb..311176c 100644 --- a/src/bin/rbw-agent/sock.rs +++ b/src/bin/rbw-agent/sock.rs @@ -43,11 +43,7 @@ impl Sock { } pub fn listen() -> anyhow::Result<tokio::net::UnixListener> { - let runtime_dir = rbw::dirs::runtime_dir(); - std::fs::create_dir_all(&runtime_dir) - .context("failed to create runtime dir")?; - - let path = runtime_dir.join("socket"); + let path = rbw::dirs::socket_file(); // if the socket already doesn't exist, that's fine let _ = std::fs::remove_file(&path); let sock = tokio::net::UnixListener::bind(&path) |