summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fcgiwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index 8430bfa..40fa156 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -269,7 +269,7 @@ static void fcgi_pass(struct fcgi_context *fc)
return;
/* now pass CGI reply back */
- while (fc->fd_stdout >= 0 && fc->fd_stderr >= 0) {
+ while (fc->fd_stdout >= 0 || fc->fd_stderr >= 0) {
FD_ZERO(&rset);
if (fc->fd_stdout >= 0) FD_SET(fc->fd_stdout, &rset);
if (fc->fd_stderr >= 0) FD_SET(fc->fd_stderr, &rset);