mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
tracing: connection closed tracepoint
This commit is contained in:
parent
b2ad6ede95
commit
caa5486574
3 changed files with 76 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue