From 517e48506e592b13ad9f0eb554b2cc8fdb73648c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 29 Oct 2013 23:05:21 -0400 Subject: [PATCH] TLS - Corrected ::recv error handling. --- src/TLSClient.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TLSClient.cpp b/src/TLSClient.cpp index a3bb42d96..f42a20b51 100644 --- a/src/TLSClient.cpp +++ b/src/TLSClient.cpp @@ -347,7 +347,13 @@ void TLSClient::recv (std::string& data) } // Something happened. - if (received < 0) + if (received < 0 && gnutls_error_is_fatal (received) == 0) + { + if (_debug) + std::cout << "c: WARNING " << gnutls_strerror (received) << "\n"; + } + + else if (received < 0) throw std::string (gnutls_strerror (received)); buffer [received] = '\0';