]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Set the "last data" time to "last ping" time when updating the latter
authorAlexander Barton <alex@barton.de>
Sun, 3 May 2020 01:04:29 +0000 (03:04 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 3 May 2020 01:15:38 +0000 (03:15 +0200)
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.

src/ngircd/conn-func.c

index 72d38b8621ff559c9c93903989e7c091b018be79..4a2d32d6a70bcb270981da9b671acc99c6630df3 100644 (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);
 }
 
 /*