Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
node: Fix conditions for socket activation
Merged lorenz opened 8 days ago

The implementation of socket activation requires not only the systemd feature, but also socket2.

1 file changed +2 -2 354805ae 4a81673d
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.");