Robert Pluim writes: > Matthias Dahl writes: > >> - if (set) >> - Available = tls_available; >> + for (channel = 0; channel < FD_SETSIZE; ++channel) >> + if (! NILP (chan_process[channel])) >> + { >> + struct Lisp_Process *p = >> + XPROCESS (chan_process[channel]); >> + >> + if (just_wait_proc && p != wait_proc) >> + continue; >> + >> + if (p && p->gnutls_p && p->gnutls_state >> + && ((emacs_gnutls_record_check_pending >> + (p->gnutls_state)) >> + > 0)) >> + { >> + nfds++; >> + eassert (p->infd == channel); >> + FD_SET (p->infd, &Available); >> + } >> + } >> } >> #endif >> } > > Hi Matthias, I apologize if this has already been mentioned, but did > you check that this doesn't undo the fix for Bug#21337? The issue > there as I recall was that FD's were set in Available that didn't > actually have data to read, hence the need to check the TLS FD's > separately using tls_available. Answering my own question: your second patch undoes the fix for 21337. I think it needs to look something like this (I've put some of the tabs back in to make the diff clearer, adjust according to taste):