fix typo in peer log

This commit is contained in:
arvidn 2018-12-03 13:28:27 +02:00 committed by Arvid Norberg
parent 70110181fc
commit 184fa88950
2 changed files with 2 additions and 2 deletions

View File

@ -5368,7 +5368,7 @@ namespace libtorrent {
#ifndef TORRENT_DISABLE_LOGGING
peer_log(channel == upload_channel
? peer_log_alert::outgoing : peer_log_alert::incoming
, "ASSIGN_BANDWIDHT", "bytes: %d", amount);
, "ASSIGN_BANDWIDTH", "bytes: %d", amount);
#endif
TORRENT_ASSERT(amount > 0 || is_disconnecting());

View File

@ -589,7 +589,7 @@ namespace libtorrent {
TORRENT_ASSERT(i->address() == c.remote().address());
#ifndef TORRENT_DISABLE_LOGGING
if (c.should_log(peer_log_alert::info))
if (i->connection != nullptr && c.should_log(peer_log_alert::info))
{
c.peer_log(peer_log_alert::info, "DUPLICATE PEER", "this: \"%s\" that: \"%s\""
, print_address(c.remote().address()).c_str()