]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Actually try to read before checking if the socket is readable
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 3 Apr 2019 15:35:41 +0000 (17:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 4 Apr 2019 09:54:06 +0000 (11:54 +0200)
commit77c3701d9ef188a0d24d61c130eaa2fa9dcfedcc
tree511407da6f1e39547f054b41f691865bff2c7902
parent87cdc63a4c7982badfd8c49cb115d00ec2e6e766
dnsdist: Actually try to read before checking if the socket is readable

We need to because the TLS layer might already have data waiting
for us, while there might not be anything left on the OS-level
buffer associated to the socket.
If we don't ask the TLS layer, we might wait indefinitely for
something to arrive while the client has already sent everything,
and it's just waiting for us because the TLS record has been read.
pdns/dnsdist-tcp.cc