Alain Schneble writes: > Eli Zaretskii writes: > >>> Date: Tue, 01 Mar 2016 18:05:36 +0200 >>> From: Eli Zaretskii >>> Cc: larsi@gnus.org, j_l_domenech@yahoo.com, 22789@debbugs.gnu.org >>> >>> IOW, let's return to the w32-specific issues when the dust settles on >>> the Posix code. >> >> It sounds like that part happened already, so do you still see any >> w32-specific issues with this? > > Sorry for the delay. It seems like there are still some issues, at > least on my system and even without any debugger attached. I'm > currently trying to find the cause... I have the impression that GnuTLS doesn't like it too much if we start retrying the handshake many times before the socket is connected. At least on MS-Windows. In nearly all of the cases of loading websites with around 20 images, I observe arbitrary failures of gnutls_try_handshake which usually end up with -10 GNUTLS_E_INVALID_SESSION. I believe this because the following patch solves the issue on my MS-Windows system: Postponing the handshake until after the socket is connected. Still, I must be honest: I'm in a kind of a trial-and-error mode. I do not really understand all the aspects of the current implementation. Anyway, I think a change in that direction would probably be a good thing. Do you agree? It eliminates all the handshake-retries that would otherwise happen before the socket is connected. I wonder if the issues that you observed with gdb attached would go away with this patch as well... You had these issues under GNU/Linux, right? It's a bit embarrassing, but I did not yet have time to learn how to use gdb to debug Emacs. (But its on my todo list.) Otherwise I would have tried it out quickly. BTW, `libgnutls-version' evaluates to 30408 on my MS-Windows. And here is the intermediate-and-not-cleaned-up patch: