NonPositionableExternalStream.st
changeset 20225 bf9e7cd9f53d
parent 20175 6c184327b58b
child 20229 b5cdb27022c8
child 20256 b706cfe3d902
--- a/NonPositionableExternalStream.st	Wed Aug 10 13:34:20 2016 +0200
+++ b/NonPositionableExternalStream.st	Wed Aug 10 13:58:04 2016 +0200
@@ -524,15 +524,19 @@
     "return true, if position is at end"
 
     (self == StdInStream) ifTrue:[
-	OperatingSystem hasConsole ifFalse:[
-	    ^ true
-	]
+        OperatingSystem hasConsole ifFalse:[
+            ^ true
+        ]
     ].
 
     "first, wait to avoid blocking on the read.
      On end of stream or error, readWait will return"
 
     self readWaitWithTimeoutMs:nil.
+    handle isNil ifTrue:[
+        "we were closed while waiting - so we are at the end"
+        ^ true.
+    ].
     ^ super atEnd.
 !