]> arthur.barton.de Git - ngircd.git/commitdiff
allow ping timeout quit messages to show the timeout value
authorDavid Kingston <deathking1337@aim.com>
Fri, 24 Apr 2009 05:01:37 +0000 (00:01 -0500)
committerFlorian Westphal <fw@strlen.de>
Thu, 23 Apr 2009 19:39:45 +0000 (21:39 +0200)
src/ngircd/conn.c

index eacbe5ae0fa5616a6a66528e2fefb1e8eb603f30..9752a6191c7e2da5b0df64779e9cc28ad1e6241c 100644 (file)
@@ -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) {