Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: Make sure node is "active" when connected
cloudhead committed 2 years ago
commit 286c639e262c4d1aefe6c40af92c32518f807d28
parent d6d90c6fdcd052dcbe44a856acab59f24d482fd1
1 file changed +2 -1
modified radicle-node/src/service/session.rs
@@ -124,7 +124,7 @@ impl Session {
            link: Link::Inbound,
            subscribe: None,
            persistent,
-
            last_active: LocalTime::default(),
+
            last_active: time,
            attempts: 0,
            rng,
            limits,
@@ -205,6 +205,7 @@ impl Session {

    pub fn to_connected(&mut self, since: LocalTime) {
        self.attempts = 0;
+
        self.last_active = since;

        let State::Attempted = &self.state else {
            panic!("Session::to_connected: can only transition to 'connected' state from 'attempted' state");