Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
fix: terminate the CI broker if the connection to the node breaks
Lars Wirzenius committed 2 years ago
commit 9791d8079268a6cc6857b0b7eda8014da4ffb94c
parent f834f3ee5f6a9caad7806950d910ddbd3e960754
1 file changed +5 -2
modified src/event.rs
@@ -89,8 +89,7 @@ impl NodeEventSource {
        loop {
            let next = self.events.next();
            if next.is_none() {
-
                info!("no more events from node");
-
                return Ok(vec![]);
+
                return Err(NodeEventError::BrokenConnection);
            }

            let event = next.unwrap()?;
@@ -118,6 +117,10 @@ pub enum NodeEventError {
    #[error(transparent)]
    Node(#[from] radicle::node::Error),

+
    /// Connection to the node control socket broke.
+
    #[error("connection to the node control socket broke")]
+
    BrokenConnection,
+

    /// Some error from parsing a repository id.
    #[error(transparent)]
    Id(#[from] radicle::identity::IdError),