From: David Kingston Date: Fri, 24 Apr 2009 05:01:37 +0000 (-0500) Subject: allow ping timeout quit messages to show the timeout value X-Git-Tag: rel-14-1~10 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=9b59f043c8bc0eb0e88cb31158c61cccdf67f23b allow ping timeout quit messages to show the timeout value --- diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index eacbe5ae..9752a619 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -1540,6 +1540,7 @@ Check_Connections(void) * if this doesn't help either, disconnect client. */ CLIENT *c; CONN_ID i; + char msg[64]; for (i = 0; i < Pool_Size; i++) { if (My_Connections[i].sock < 0) @@ -1559,8 +1560,8 @@ Check_Connections(void) LogDebug ("Connection %d: Ping timeout: %d seconds.", i, Conf_PongTimeout); - Conn_Close(i, NULL, "Ping timeout", - true); + snprintf(msg, sizeof(msg), "Ping timeout: %d seconds", Conf_PongTimeout); + Conn_Close(i, NULL, msg, true); } } else if (My_Connections[i].lastdata < time(NULL) - Conf_PingTimeout) {