diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 89a5f3e0386..1544522ff55 100644 --- a/src/process.c +++ b/src/process.c @@ -4533,6 +4533,22 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, &Available, (check_write ? &Writeok : (SELECT_TYPE *)0), (SELECT_TYPE *)0, &timeout); + +#ifdef HAVE_GNUTLS + /* GnuTLS buffers data internally. In lowat mode it leaves + some data in the TCP buffers so that select works, but + with custom pull/push functions we need to check if some + data is available in the buffers manually. */ + if (nfds == 0 && + wait_proc && wait_proc->gnutls_p /* Check for valid process. */ + /* Do we have pending data? */ + && gnutls_record_check_pending (wait_proc->gnutls_state) > 0) + { + nfds = 1; + /* Set to Available. */ + FD_SET (wait_proc->infd, &Available); + } +#endif } xerrno = errno; |
