From 87cdc63a4c7982badfd8c49cb115d00ec2e6e766 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 3 Apr 2019 17:30:52 +0200 Subject: [PATCH] dnsdist: Better reporting of syscall errors via OpenSSL's libssl --- pdns/dnsdistdist/tcpiohandler.cc | 3 +++ 1 file changed, 3 insertions(+) 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)); } -- 2.47.2