Subject: Re: bug#22789: 25.1.50; In last master build https connections stop working

From: Eli Zaretskii <[email-masked]>
Date: Sun, 28 Feb 2016 18:53:02 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sun, 28 Feb 2016 14:01:19 +1030
> Cc: "José L. Doménech"
> 	<[email-masked]>, [email-masked]
> 
> Both I don't think that code path (sys_write) has ever been called
> before on a nonblocking socket.  (Because we've always opened the
> sockets before without O_NONBLOCK, since we've never called
> `make-network-process' with :nowait t before from `open-gnutls-stream'.)
> 
> So ... is it possible that these functions that w32.c calls just
> don't...  quite work with nonblocking sockets?

That's not true, non-blocking sockets are supported on Windows since a
year ago.

And the above aren't the right questions anyway: the problem is not
with sockets per se, the problem is with a TLS connection
specifically.  And I think it is caused by the fact that now we
proceed to GnuTLS handshaking right after the call to 'connect', which
takes some time to complete, when the socket is non-blocking.