Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
node: Fix conditions for socket activation
Lorenz Leutgeb committed 8 days ago
commit 4a81673d0efe82fce0a7193b6b3e13b735e3462d
parent 354805a
1 file changed +2 -2
modified crates/radicle-node/src/runtime.rs
@@ -321,7 +321,7 @@ impl Runtime {
        Ok(())
    }

-
    #[cfg(all(feature = "systemd", target_os = "linux"))]
+
    #[cfg(all(feature = "socket2", feature = "systemd", target_os = "linux"))]
    fn receive_listener() -> Option<UnixListener> {
        // SAFETY: When `fd` is called, no other threads are spawned (yet).
        let fd = match unsafe { radicle_systemd::listen::fd("control") } {
@@ -352,7 +352,7 @@ impl Runtime {
    }

    fn bind(path: PathBuf) -> Result<ControlSocket, Error> {
-
        #[cfg(all(feature = "systemd", target_os = "linux"))]
+
        #[cfg(all(feature = "socket2", feature = "systemd", target_os = "linux"))]
        {
            if let Some(listener) = Self::receive_listener() {
                log::info!(target: "node", "Received control socket.");