From: Pierre Ossman Date: Fri, 11 Jun 2021 07:40:49 +0000 (+0200) Subject: Don't wait for TLS close response X-Git-Tag: v1.11.90~39^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e779322f0529011cd23ad47b0f25a951e87714de;p=tigervnc.git 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. --- 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)); }