summary refs log tree commit diff
path: root/src/ipaddr
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2020-05-25 19:02:16 +0200
committerAlexander Barton <alex@barton.de>2020-05-25 22:59:58 +0200
commitdc6807338e240d8093f43337dab7bfe488c35c4a (patch)
tree286dc7302f652af2877eb34e973c6716a2e58269 /src/ipaddr
parent0d503945cb527e275ef6644a234a6876ff61322b (diff)
downloadngircd-dc6807338e240d8093f43337dab7bfe488c35c4a.tar.gz
ngircd-dc6807338e240d8093f43337dab7bfe488c35c4a.zip
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.
Diffstat (limited to 'src/ipaddr')
0 files changed, 0 insertions, 0 deletions