From: Timo Sirainen Date: Fri, 24 Nov 2017 16:18:45 +0000 (+0200) Subject: director: Log exactly how long PING was waited on before it timed out. X-Git-Tag: 2.2.34~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e85d0e59257ea1423e024d60d568f2594b771c5f;p=thirdparty%2Fdovecot%2Fcore.git director: Log exactly how long PING was waited on before it timed out. --- diff --git a/src/director/director-connection.c b/src/director/director-connection.c index 95c3a86c19..b70223831e 100644 --- a/src/director/director-connection.c +++ b/src/director/director-connection.c @@ -2482,9 +2482,10 @@ static void director_connection_ping_idle_timeout(struct director_connection *conn) { string_t *str = t_str_new(128); + int diff = timeval_diff_msecs(&ioloop_timeval, &conn->ping_sent_time); - str_printfa(str, "Ping timed out in %u secs, disconnecting (", - DIRECTOR_CONNECTION_PING_IDLE_TIMEOUT_MSECS/1000); + str_printfa(str, "Ping timed out in %u.%03u secs, disconnecting (", + diff/1000, diff%1000); director_connection_append_stats(conn, str); if (conn->handshake_received) str_append(str, ", handshaked");