From e779322f0529011cd23ad47b0f25a951e87714de Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 11 Jun 2021 09:40:49 +0200 Subject: [PATCH] Don't wait for TLS close response Our current architecture doesn't support waiting for a response here, so don't even try or we'll just get an error. --- common/rfb/CSecurityTLS.cxx | 4 +++- common/rfb/SSecurityTLS.cxx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index d33a76e2..5337d8d6 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -104,7 +104,9 @@ void CSecurityTLS::shutdown() { if (session) { int ret; - ret = gnutls_bye(session, GNUTLS_SHUT_RDWR); + // FIXME: We can't currently wait for the response, so we only send + // our close and hope for the best + ret = gnutls_bye(session, GNUTLS_SHUT_WR); if ((ret != GNUTLS_E_SUCCESS) && (ret != GNUTLS_E_INVALID_SESSION)) vlog.error("TLS shutdown failed: %s", gnutls_strerror(ret)); } diff --git a/common/rfb/SSecurityTLS.cxx b/common/rfb/SSecurityTLS.cxx index 72262b9a..db0221f8 100644 --- a/common/rfb/SSecurityTLS.cxx +++ b/common/rfb/SSecurityTLS.cxx @@ -66,7 +66,9 @@ void SSecurityTLS::shutdown() { if (session) { int ret; - ret = gnutls_bye(session, GNUTLS_SHUT_RDWR); + // FIXME: We can't currently wait for the response, so we only send + // our close and hope for the best + ret = gnutls_bye(session, GNUTLS_SHUT_WR); if ((ret != GNUTLS_E_SUCCESS) && (ret != GNUTLS_E_INVALID_SESSION)) vlog.error("TLS shutdown failed: %s", gnutls_strerror(ret)); } -- 2.39.5