From: Remi Gacogne Date: Wed, 3 Apr 2019 15:30:52 +0000 (+0200) Subject: dnsdist: Better reporting of syscall errors via OpenSSL's libssl X-Git-Tag: dnsdist-1.4.0-alpha1~25^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87cdc63a4c7982badfd8c49cb115d00ec2e6e766;p=thirdparty%2Fpdns.git dnsdist: Better reporting of syscall errors via OpenSSL's libssl --- diff --git a/pdns/dnsdistdist/tcpiohandler.cc b/pdns/dnsdistdist/tcpiohandler.cc index 9d44f0dba7..4b4fc59194 100644 --- a/pdns/dnsdistdist/tcpiohandler.cc +++ b/pdns/dnsdistdist/tcpiohandler.cc @@ -258,6 +258,9 @@ public: else if (error == SSL_ERROR_WANT_WRITE) { return IOState::NeedWrite; } + else if (error == SSL_ERROR_SYSCALL) { + throw std::runtime_error("Error while processing TLS connection:" + std::string(strerror(errno))); + } else { throw std::runtime_error("Error while processing TLS connection:" + std::to_string(error)); }