diff options
Diffstat (limited to 'common/rdr/TLSInStream.cxx')
-rw-r--r-- | common/rdr/TLSInStream.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/rdr/TLSInStream.cxx b/common/rdr/TLSInStream.cxx index 70303db0..ba20e752 100644 --- a/common/rdr/TLSInStream.cxx +++ b/common/rdr/TLSInStream.cxx @@ -25,11 +25,14 @@ #include <rdr/Exception.h> #include <rdr/TLSException.h> #include <rdr/TLSInStream.h> +#include <rfb/LogWriter.h> #include <errno.h> #ifdef HAVE_GNUTLS using namespace rdr; +static rfb::LogWriter vlog("TLSInStream"); + ssize_t TLSInStream::pull(gnutls_transport_ptr_t str, void* data, size_t size) { TLSInStream* self= (TLSInStream*) str; @@ -45,8 +48,10 @@ ssize_t TLSInStream::pull(gnutls_transport_ptr_t str, void* data, size_t size) size = in->avail(); in->readBytes(data, size); - + } catch (EndOfStream&) { + return 0; } catch (Exception& e) { + vlog.error("Failure reading TLS data: %s", e.str()); gnutls_transport_set_errno(self->session, EINVAL); return -1; } |