]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Keep watching idle DoH backend connections
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 13 Oct 2021 16:02:33 +0000 (18:02 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 13 Oct 2021 16:02:33 +0000 (18:02 +0200)
commitbecad6135c0a21e5b1b7dcf6c5681b315e010e05
treeb94db8bbd9dc60fd8272268113ed837e2fcc8c9e
parent450d07c8df72ffa7eabf78c4d5cd4d935f500a51
dnsdist: Keep watching idle DoH backend connections

So we can quickly detect a connection closed by the remote host. The
`isTCPSocketUsable()` function is unfortunately not enough if the
remote end properly sent a GO AWAY frame before closing the connection,
as the socket then becomes readable and usable, instead of closed. We
need to actually read that message to know that the remote end closed
the connection.
pdns/dnsdistdist/dnsdist-nghttp2.cc
pdns/dnsdistdist/test-dnsdistnghttp2_cc.cc