aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2019-08-23 01:17:48 +0000
committerNIIBE Yutaka <[email protected]>2019-08-23 01:17:48 +0000
commitab87480fc201ad687153429aee043ab454fed0a3 (patch)
treecaac6eedefc6eee636a41ec9613b3b571637d0e6
parentestream: Fix poll condition. (diff)
downloadlibgpg-error-ab87480fc201ad687153429aee043ab454fed0a3.tar.gz
libgpg-error-ab87480fc201ad687153429aee043ab454fed0a3.zip
estream: Fix gpgrt_poll to prevent waiting indefinitely for others.
* src/estream.c (_gpgrt_poll): Go to leave, when something is ready. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--src/estream.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/estream.c b/src/estream.c
index 4ec5695..0d8f522 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -4838,6 +4838,9 @@ _gpgrt_poll (gpgrt_poll_t *fds, unsigned int nfds, int timeout)
/* FIXME */
}
+ if (count)
+ goto leave;
+
/* Now do the real select. */
#ifdef HAVE_W32_SYSTEM