allow ping timeout quit messages to show the timeout value
This commit is contained in:
parent
b545d38ae4
commit
9b59f043c8
|
@ -1540,6 +1540,7 @@ Check_Connections(void)
|
||||||
* if this doesn't help either, disconnect client. */
|
* if this doesn't help either, disconnect client. */
|
||||||
CLIENT *c;
|
CLIENT *c;
|
||||||
CONN_ID i;
|
CONN_ID i;
|
||||||
|
char msg[64];
|
||||||
|
|
||||||
for (i = 0; i < Pool_Size; i++) {
|
for (i = 0; i < Pool_Size; i++) {
|
||||||
if (My_Connections[i].sock < 0)
|
if (My_Connections[i].sock < 0)
|
||||||
|
@ -1559,8 +1560,8 @@ Check_Connections(void)
|
||||||
LogDebug
|
LogDebug
|
||||||
("Connection %d: Ping timeout: %d seconds.",
|
("Connection %d: Ping timeout: %d seconds.",
|
||||||
i, Conf_PongTimeout);
|
i, Conf_PongTimeout);
|
||||||
Conn_Close(i, NULL, "Ping timeout",
|
snprintf(msg, sizeof(msg), "Ping timeout: %d seconds", Conf_PongTimeout);
|
||||||
true);
|
Conn_Close(i, NULL, msg, true);
|
||||||
}
|
}
|
||||||
} else if (My_Connections[i].lastdata <
|
} else if (My_Connections[i].lastdata <
|
||||||
time(NULL) - Conf_PingTimeout) {
|
time(NULL) - Conf_PingTimeout) {
|
||||||
|
|
Loading…
Reference in New Issue