summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/xdr/xdr_rec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c
index a50d141..34238ed 100644
--- a/lib/libc/xdr/xdr_rec.c
+++ b/lib/libc/xdr/xdr_rec.c
@@ -574,6 +574,12 @@ __xdrrec_getrec(xdrs, statp, expectdata)
rstrm->in_header &= ~LAST_FRAG;
rstrm->last_frag = TRUE;
}
+ /*
+ * We can only reasonably expect to read once from a
+ * non-blocking stream. Reading the fragment header
+ * may have drained the stream.
+ */
+ expectdata = FALSE;
}
n = rstrm->readit(rstrm->tcp_handle,
OpenPOWER on IntegriCloud