Add a comment about not cloning the server channel any more than we are

This commit is contained in:
Deirdre Connolly 2019-10-21 14:31:47 -04:00 committed by Deirdre Connolly
parent 61a07c67ef
commit 8588c44bcf
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ use crate::protocol::types::*;
pub const REQUEST_TIMEOUT: Duration = Duration::from_secs(10);
/// We expect to receive a message from a live peer at least once in this time duration.
/// XXX this needs to be synchronized with the ping transmission times.
// XXX this needs to be synchronized with the ping transmission times.
pub const LIVE_PEER_DURATION: Duration = Duration::from_secs(12);
/// The User-Agent string provided by the node.

View File

@ -162,6 +162,8 @@ where
debug!("constructing PeerClient, spawning PeerServer");
// These channels should not be cloned more than they are
// in this block, see constants.rs for more.
let (server_tx, server_rx) = mpsc::channel(0);
let slot = ErrorSlot::default();