From b34c6d2c9694ec300b92129dbf88fe012837dfe2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 15 Jul 2019 13:28:25 +0200 Subject: [PATCH] Don't delete GnuTLS boot parameters too early * 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/process.c b/src/process.c index 5f552675db6..abadabe77ea 100644 --- a/src/process.c +++ b/src/process.c @@ -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); -- 2.39.2