mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 18:53:21 +01:00
tracing: connection closed tracepoint
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
TRACEPOINT_SEMAPHORE(net, closed_connection);
|
||||
TRACEPOINT_SEMAPHORE(net, evicted_inbound_connection);
|
||||
TRACEPOINT_SEMAPHORE(net, inbound_connection);
|
||||
TRACEPOINT_SEMAPHORE(net, outbound_connection);
|
||||
@@ -563,6 +564,13 @@ void CNode::CloseSocketDisconnect()
|
||||
if (m_sock) {
|
||||
LogDebug(BCLog::NET, "Resetting socket for peer=%d%s", GetId(), LogIP(fLogIPs));
|
||||
m_sock.reset();
|
||||
|
||||
TRACEPOINT(net, closed_connection,
|
||||
GetId(),
|
||||
m_addr_name.c_str(),
|
||||
ConnectionTypeAsString().c_str(),
|
||||
ConnectedThroughNetwork(),
|
||||
Ticks<std::chrono::seconds>(m_connected));
|
||||
}
|
||||
m_i2p_sam_session.reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user