summaryrefslogtreecommitdiffstats
path: root/generic/tclIOGT.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIOGT.c')
-rw-r--r--generic/tclIOGT.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index 9c4347d..ca66d4d 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -677,6 +677,18 @@ TransformInputProc(
break;
}
+ if (dataPtr->readIsFlushed) {
+ /*
+ * Already saw EOF from downChan; don't ask again.
+ * NOTE: Could move this up to avoid the last maxRead
+ * execution. Believe this would still be correct behavior,
+ * but the test suite tests the whole command callback
+ * sequence, so leave it unchanged for now.
+ */
+
+ break;
+ }
+
/*
* Get bytes from the underlying channel.
*/
@@ -711,14 +723,6 @@ TransformInputProc(
* on the down channel.
*/
- if (dataPtr->readIsFlushed) {
- /*
- * Already flushed, nothing to do anymore.
- */
-
- break;
- }
-
dataPtr->readIsFlushed = 1;
ExecuteCallback(dataPtr, NULL, A_FLUSH_READ, NULL, 0,
TRANSMIT_IBUF, P_PRESERVE);