Add a comment about not cloning the server channel any more than we are
This commit is contained in:
parent
61a07c67ef
commit
8588c44bcf
|
|
@ -9,7 +9,7 @@ use crate::protocol::types::*;
|
||||||
pub const REQUEST_TIMEOUT: Duration = Duration::from_secs(10);
|
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.
|
/// 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);
|
pub const LIVE_PEER_DURATION: Duration = Duration::from_secs(12);
|
||||||
|
|
||||||
/// The User-Agent string provided by the node.
|
/// The User-Agent string provided by the node.
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,8 @@ where
|
||||||
|
|
||||||
debug!("constructing PeerClient, spawning PeerServer");
|
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 (server_tx, server_rx) = mpsc::channel(0);
|
||||||
let slot = ErrorSlot::default();
|
let slot = ErrorSlot::default();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue