Branch: refs/heads/master Home: https://github.com/ngircd/ngircd Commit: 0d503945cb527e275ef6644a234a6876ff61322b https://github.com/ngircd/ngircd/commit/0d503945cb527e275ef6644a234a6876ff61... Author: Alexander Barton alex@barton.de Date: 2020-05-25 (Mon, 25 May 2020)
Changed paths: M src/ngircd/conn-func.c
Log Message: ----------- Revert "Set the "last data" time to "last ping" time when updating the latter"
This patch completely broke the PING-PONG logic: now ngIRCd never disconnects any stale peers but keeps sending out PINGs over and over again ...
The real issue (server disconnects right after connect) will be fixed in the next commit, but let's revert to the somewhat "half-broken but 'known' state" first ...
This reverts commit 79a917f954bef8089967786bd3597a6e5ff5c336.
Commit: dc6807338e240d8093f43337dab7bfe488c35c4a https://github.com/ngircd/ngircd/commit/dc6807338e240d8093f43337dab7bfe488c3... Author: Alexander Barton alex@barton.de Date: 2020-05-25 (Mon, 25 May 2020)
Changed paths: M src/ngircd/conn-func.c M src/ngircd/conn-func.h M src/ngircd/conn.c M src/ngircd/irc-login.c
Log Message: ----------- Fix PING-PONG handling when processing backlog in read buffers
Prior to this commit, the PONG wasn't registered correctly, becauuse the "last ping" time was set to time(NULL), which could be bigger than the "last data" time stamp, for example when handling the read buffer took more than 1 second -- and this resulted in the PONG time out kicking in effectively disconnecting a newly linked server for example, because ngIRCd thought it was still waiting for a PONG: last data < last ping.
Now the "last ping" value has three possible values:
0: new connection, no PING, no PONG so far. 1: got a PONG, no longer waiting for a PONG. <t>: time stamp of last sent out PING command.
Compare: https://github.com/ngircd/ngircd/compare/bae68eb612ef...dc6807338e24
ngircd-commits@lists.barton.de