updated dht verbose logging to try to catch #176
This commit is contained in:
parent
e931ee54f6
commit
29fa298d05
|
@ -226,6 +226,10 @@ bool rpc_manager::incoming(msg const& m)
|
||||||
std::ofstream reply_stats("libtorrent_logs/round_trip_ms.log", std::ios::app);
|
std::ofstream reply_stats("libtorrent_logs/round_trip_ms.log", std::ios::app);
|
||||||
reply_stats << m.addr << "\t" << total_milliseconds(time_now() - o->sent)
|
reply_stats << m.addr << "\t" << total_milliseconds(time_now() - o->sent)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
#endif
|
||||||
|
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||||
|
TORRENT_LOG(rpc) << "Reply with transaction id: "
|
||||||
|
<< tid << " from " << m.addr;
|
||||||
#endif
|
#endif
|
||||||
o->reply(m);
|
o->reply(m);
|
||||||
m_transactions[tid] = 0;
|
m_transactions[tid] = 0;
|
||||||
|
@ -284,6 +288,10 @@ time_duration rpc_manager::tick()
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_transactions[m_oldest_transaction_id] = 0;
|
m_transactions[m_oldest_transaction_id] = 0;
|
||||||
|
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||||
|
TORRENT_LOG(rpc) << "Timing out transaction id: "
|
||||||
|
<< m_oldest_transaction_id << " from " << o->target_addr;
|
||||||
|
#endif
|
||||||
timeouts.push_back(o);
|
timeouts.push_back(o);
|
||||||
} catch (std::exception) {}
|
} catch (std::exception) {}
|
||||||
}
|
}
|
||||||
|
@ -309,7 +317,13 @@ unsigned int rpc_manager::new_transaction_id(observer_ptr o)
|
||||||
// moving the observer into the set of aborted transactions
|
// moving the observer into the set of aborted transactions
|
||||||
// it will prevent it from spawning new requests right now,
|
// it will prevent it from spawning new requests right now,
|
||||||
// since that would break the invariant
|
// since that would break the invariant
|
||||||
m_aborted_transactions.push_back(m_transactions[m_next_transaction_id]);
|
observer_ptr o = m_transactions[m_next_transaction_id];
|
||||||
|
m_aborted_transactions.push_back(o);
|
||||||
|
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||||
|
TORRENT_LOG(rpc) << "[new_transaction_id] Aborting message with transaction id: "
|
||||||
|
<< m_next_transaction_id << " sent to " << o->target_addr
|
||||||
|
<< " at " << o->sent;
|
||||||
|
#endif
|
||||||
m_transactions[m_next_transaction_id] = 0;
|
m_transactions[m_next_transaction_id] = 0;
|
||||||
TORRENT_ASSERT(m_oldest_transaction_id == m_next_transaction_id);
|
TORRENT_ASSERT(m_oldest_transaction_id == m_next_transaction_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue