]> source.dussan.org Git - tigervnc.git/commitdiff
Don't wait for TLS close response 1272/head
authorPierre Ossman <ossman@cendio.se>
Fri, 11 Jun 2021 07:40:49 +0000 (09:40 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 11 Jun 2021 07:42:44 +0000 (09:42 +0200)
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
common/rfb/SSecurityTLS.cxx

index d33a76e2351ee5ab6dfa014378176d6beb6d9165..5337d8d6ba82e695fc14cd89f0516eb117161b24 100644 (file)
@@ -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));
   }
index 72262b9afb8a6957986f1495835f3c6f0aebcb5b..db0221f8930697d36ac3febcbc0f9feb4946b729 100644 (file)
@@ -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));
   }