diff options
Diffstat (limited to 'common/rfb/CSecurityTLS.cxx')
-rw-r--r-- | common/rfb/CSecurityTLS.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index ed570ad4..c22fa2d9 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -116,11 +116,11 @@ void CSecurityTLS::setDefaults() x509crl.setDefaultStr(strdup(crlDefault.buf)); } -void CSecurityTLS::shutdown() +void CSecurityTLS::shutdown(bool needbye) { - if (session) + if (session && needbye) if (gnutls_bye(session, GNUTLS_SHUT_RDWR) != GNUTLS_E_SUCCESS) - throw Exception("gnutls_bye failed"); + vlog.error("gnutls_bye failed"); if (anon_cred) { gnutls_anon_free_client_credentials(anon_cred); @@ -143,7 +143,7 @@ void CSecurityTLS::shutdown() CSecurityTLS::~CSecurityTLS() { - shutdown(); + shutdown(true); if (fis) delete fis; @@ -191,7 +191,7 @@ bool CSecurityTLS::processMsg(CConnection* cc) if (err != GNUTLS_E_SUCCESS) { vlog.error("TLS Handshake failed: %s\n", gnutls_strerror (err)); - shutdown(); + shutdown(false); throw AuthFailureException("TLS Handshake failed"); } |