]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
gtls: make gnutls_bye() not wait for response on shutdown
authorDaniel Stenberg <daniel@haxx.se>
Wed, 30 Oct 2019 08:44:30 +0000 (09:44 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 31 Oct 2019 08:10:50 +0000 (09:10 +0100)
... as it can make it wait there for a long time for no good purpose.

Patched-by: Jay Satiro
Reported-by: Bylon2 on github
Adviced-by: Nikos Mavrogiannopoulos
Fixes #4487
Closes #4541

lib/vtls/gtls.c

index 0a83f35afde7f5c3cbea81208c6d6390e7bc27e1..3737d7c685ae2d413ff5c60be2ae6f83a2e8dd2e 100644 (file)
@@ -1608,7 +1608,7 @@ static ssize_t gtls_send(struct connectdata *conn,
 static void close_one(struct ssl_connect_data *connssl)
 {
   if(BACKEND->session) {
-    gnutls_bye(BACKEND->session, GNUTLS_SHUT_RDWR);
+    gnutls_bye(BACKEND->session, GNUTLS_SHUT_WR);
     gnutls_deinit(BACKEND->session);
     BACKEND->session = NULL;
   }