Skip to content

Commit

Permalink
Remote unused Relay control message
Browse files Browse the repository at this point in the history
  • Loading branch information
bartnv committed Sep 2, 2024
1 parent b9dbd6d commit c985733
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ pub async fn run(aconfig: Arc<RwLock<Config>>, mut rx: sync::mpsc::Receiver<Cont
Control::NewLink(sender, from, to, seq) => {
let mut config = aconfig.write().unwrap();
if let Some(node) = config.nodes.iter_mut().find(|node| node.name == from) {
if node.lastconnseq == seq { continue; }
if node.lastconnseq == seq { continue; } // Duplicate message; drop it
node.lastconnseq = seq;
}
drop(config);
Expand Down Expand Up @@ -698,9 +698,6 @@ pub async fn run(aconfig: Arc<RwLock<Config>>, mut rx: sync::mpsc::Receiver<Cont
}
}
},
Control::Relay(from, proto) => {
relaymsgs.push((from, proto, false));
},
Control::Scan(from, to) => {
if to == myname {
udpmsgs.push(Control::ScanNode(from, true));
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ pub enum Control {
NewLink(String, String, String, u32), // Sender name, link from, link to, link seqno
DropLink(String, String, String), // Sender name, link from, link to
Ports(String, String, Vec<String>), // From node, about node, ports
Relay(String, Protocol), // Sender name, protocol message
Send(Protocol), // Protocol message to send
Scan(String, String), // From node, to node
ScanNode(String, bool), // Node name to (re)scan, initiated externally
Expand Down

0 comments on commit c985733

Please sign in to comment.