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

From: Alain Schneble <[email-masked]>
Date: Tue, 1 Mar 2016 18:09:40 +0100

Eli Zaretskii <[email-masked]> writes:

> So yes, if we have a signal that is delivered from one of these
> handshakes, it will cause the loop to run again.

I guess if we do a fcntl(socket, F_SETFL, O_ASYNC), we may get a
notification if the socket has been connected.  This could be the
trigger to do the first TLS handshake try.  For subsequent tries, if
needed, we somehow have to rescedule them.  For example with just
another round, triggered by a short pselect timeout, like you proposed.