Logging
This commit is contained in:
parent
1fa05837fb
commit
42d184ff6b
1 changed files with 2 additions and 1 deletions
|
|
@ -905,7 +905,7 @@ impl TorrentStateLive {
|
||||||
// and addrs_closed_to_sent are only filtered addresses from sent_peers_live
|
// and addrs_closed_to_sent are only filtered addresses from sent_peers_live
|
||||||
|
|
||||||
if !addrs_live_to_sent.is_empty() || !addrs_closed_to_sent.is_empty() {
|
if !addrs_live_to_sent.is_empty() || !addrs_closed_to_sent.is_empty() {
|
||||||
debug!(peer=?peer_addr, "sending PEX with {} live ({:?})and {} closed peers", addrs_live_to_sent.len(), addrs_live_to_sent,addrs_closed_to_sent.len());
|
debug!("sending PEX with {} live ({:?})and {} closed peers", addrs_live_to_sent.len(), addrs_live_to_sent,addrs_closed_to_sent.len());
|
||||||
let pex_msg =
|
let pex_msg =
|
||||||
extended::ut_pex::UtPex::from_addrs(&addrs_live_to_sent, &addrs_closed_to_sent);
|
extended::ut_pex::UtPex::from_addrs(&addrs_live_to_sent, &addrs_closed_to_sent);
|
||||||
let ext_msg = extended::ExtendedMessage::UtPex(pex_msg);
|
let ext_msg = extended::ExtendedMessage::UtPex(pex_msg);
|
||||||
|
|
@ -1859,6 +1859,7 @@ impl PeerHandler {
|
||||||
B: AsRef<[u8]> + std::fmt::Debug,
|
B: AsRef<[u8]> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
// TODO: this is just first attempt at pex - will need more sophistication on adding peers - BEP 40, check number of live, seen peers ...
|
// TODO: this is just first attempt at pex - will need more sophistication on adding peers - BEP 40, check number of live, seen peers ...
|
||||||
|
debug!("received PEX message with {} added peers and {} dropped peers", msg.added_peers().count(), msg.dropped_peers().count());
|
||||||
msg.dropped_peers()
|
msg.dropped_peers()
|
||||||
.chain(msg.added_peers())
|
.chain(msg.added_peers())
|
||||||
.for_each(|peer| {
|
.for_each(|peer| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue