summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIORTrans.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index 45ee08d..8f3ef3c 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -1097,6 +1097,11 @@ ReflectInput(
goto stop;
}
+ if (rtPtr->readIsDrained) {
+ goto stop;
+ }
+
+
/*
* The buffer is exhausted, but the caller wants even more. We now
* have to go to the underlying channel, get more bytes and then
@@ -1166,10 +1171,6 @@ ReflectInput(
* on the down channel.
*/
- if (rtPtr->readIsDrained) {
- goto stop;
- }
-
/*
* Now this is a bit different. The partial data waiting is
* converted and returned.