Subject: Re: bug#40665: 28.0.50; tls hang on local ssl

From: Derek Zhou <[email-masked]>
Date: Wed, 22 Apr 2020 12:25:59 +0000 (UTC)

Robert Pluim writes:

>>>>>> On Tue, 21 Apr 2020 22:29:30 +0000 (UTC), Derek Zhou <[email-masked]> said:
>
>     Derek> Version 3, add safty guard for tls read detection. Please use this one.
>     Derek> You may want to review this carefully.
>
> I haven't tested it yet, but what about wait_proc?
>
I don't quite understand the wait_proc business. The idea of the patch
is to detect that out of all the fds that are going to be selected, how
many are gnutls managed and are ready from the gnutls buffer? If the
answer is positive, we skip the select and pretend the select return
those fds only. I think this is safe; because it is one of the possible
and legal return of the select, wait_proc or not.

Another way is to still do a zero timeout select, and merge the gnutls
ready set with the select ready set. It is more intrusive but probably
closer to the original intent of the code. I can write the path that way
if you want.

Derek