NonPositionableExternalStream.st
branchjv
changeset 20229 b5cdb27022c8
parent 20205 03e626304d06
parent 20225 bf9e7cd9f53d
child 20342 219a5a47e8b1
--- a/NonPositionableExternalStream.st	Wed Aug 10 07:04:17 2016 +0200
+++ b/NonPositionableExternalStream.st	Thu Aug 11 06:44:08 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.
 !