net: additional disconnection logging

Use the word "disconnecting" everywhere for easier grep.
This commit is contained in:
Sjors Provoost
2024-07-23 10:53:15 +02:00
parent f7144b24be
commit ad224429f8
4 changed files with 49 additions and 18 deletions

View File

@@ -947,6 +947,14 @@ public:
std::string ConnectionTypeAsString() const { return ::ConnectionTypeAsString(m_conn_type); }
/**
* Helper function to log disconnects.
*
* @param[in] log_ip whether to include the IP address
* @return "disconnecting peer=..." and optionally "peeraddr=..."
*/
std::string DisconnectMsg(bool log_ip) const;
/** A ping-pong round trip has completed successfully. Update latest and minimum ping times. */
void PongReceived(std::chrono::microseconds ping_time) {
m_last_ping_time = ping_time;