aboutsummaryrefslogtreecommitdiff
path: root/dpip
diff options
context:
space:
mode:
Diffstat (limited to 'dpip')
-rw-r--r--dpip/dpip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dpip/dpip.c b/dpip/dpip.c
index 170e4a88..dd97ec4a 100644
--- a/dpip/dpip.c
+++ b/dpip/dpip.c
@@ -451,8 +451,9 @@ char *a_Dpip_dsh_read_token(Dsh *dsh, int blocking)
}
} else if (dsh->mode & DPIP_RAW) {
- /* Wait for data when the buffer is empty and there's no EOF yet */
- while (dsh->rdbuf->len == 0 && dsh->status != DPIP_EOF)
+ /* Wait for data when the buffer is empty and there's no ERR/EOF */
+ while (dsh->rdbuf->len == 0 &&
+ dsh->status != DPIP_ERROR && dsh->status != DPIP_EOF)
Dpip_dsh_read(dsh, 1);
}
}