]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't delete GnuTLS boot parameters too early
authorRobert Pluim <rpluim@gmail.com>
Mon, 15 Jul 2019 11:28:25 +0000 (13:28 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 15 Jul 2019 11:30:11 +0000 (13:30 +0200)
* src/process.c (connect_network_socket): Don't delete the GnuTLS
boot parameters until after we've managed to connect at the IP
level (bug#36660).

src/process.c

index 5f552675db69df1c0f3f9e50ebdc5a080007a5ac..abadabe77ea055a7a1b97581e4a16adff3ab6093 100644 (file)
@@ -3682,11 +3682,13 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
       Lisp_Object boot, params = p->gnutls_boot_parameters;
 
       boot = Fgnutls_boot (proc, XCAR (params), XCDR (params));
-      p->gnutls_boot_parameters = Qnil;
 
       if (p->gnutls_initstage == GNUTLS_STAGE_READY)
-       /* Run sentinels, etc. */
-       finish_after_tls_connection (proc);
+        {
+          p->gnutls_boot_parameters = Qnil;
+         /* Run sentinels, etc. */
+         finish_after_tls_connection (proc);
+        }
       else if (p->gnutls_initstage != GNUTLS_STAGE_HANDSHAKE_TRIED)
        {
          deactivate_process (proc);