1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 01:40:27 +00:00

Set the "last data" time to "last ping" time when updating the latter

This is required because the PING can be received quite a bit earlier
than it is actually handled, for example during "server burst" or other
heavy operations:
So the times won't match and PING-PONG logic would become garbled,
because we test for "last ping > last data" to determine if a PING
already was sent or not.
This commit is contained in:
Alexander Barton 2020-05-03 03:04:29 +02:00
parent 42e8654d7b
commit 79a917f954

View File

@ -51,7 +51,7 @@ GLOBAL void
Conn_UpdatePing(CONN_ID Idx)
{
assert(Idx > NONE);
My_Connections[Idx].lastping = time(NULL);
My_Connections[Idx].lastping = My_Connections[Idx].lastdata = time(NULL);
}
/*