From 4eb739dcab2a1a79e1e0e60feddb0d9cc0d74108 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 19 Feb 2018 20:06:10 -0800 Subject: more WIP on synchronizer --- src/synchronizer.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/synchronizer.rs') diff --git a/src/synchronizer.rs b/src/synchronizer.rs index 277bf64..cfc4cd3 100644 --- a/src/synchronizer.rs +++ b/src/synchronizer.rs @@ -136,14 +136,15 @@ impl Synchronizer { } fn handle_msg(&mut self, pm: &PeerMsg) -> Result<()> { + // NB: this is the simplistic model of registers (only works up to 2x per peer) // mutable ref to PeerThread for this message let pt = self.peers.get_mut(&pm.peer_handle).unwrap(); // NB: this is the simplistic model of registers (only works up to 2x per peer?) if pm.feed_index as usize >= self.registers.len() { - // XXX: invalid feed! drop connection - pt.close()?; + // Ignore feed channels we haven't registered yet + return Ok(()); } match &pm.msg { -- cgit v1.2.3