about summary refs log tree commit diff stats
path: root/src/loader/loaderhandle.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-27 17:40:33 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-27 17:46:25 +0100
commit5c978a3441cec24f2ffbd11b6e6bb3e2f429aadf (patch)
tree58d62fc10188c51b95ab615952f0bd3ca9550dde /src/loader/loaderhandle.nim
parent29f4655f5c04eeabb07c7c27bd564e0b4ae896f5 (diff)
downloadchawan-5c978a3441cec24f2ffbd11b6e6bb3e2f429aadf.tar.gz
loader: fix early return in handleRead
Ensure that a) dead outputs do not continue to get more data from
istream and b) if all outputs are dead, istream is immediately closed.

Also, remove that pointless loop in loadStreamRegular (it did nothing
that handleRead did not).
Diffstat (limited to 'src/loader/loaderhandle.nim')
-rw-r--r--src/loader/loaderhandle.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/loader/loaderhandle.nim b/src/loader/loaderhandle.nim
index 24f4a584..d113a48e 100644
--- a/src/loader/loaderhandle.nim
+++ b/src/loader/loaderhandle.nim
@@ -31,6 +31,7 @@ type
     sostream*: SocketStream # saved ostream when redirected
     clientId*: StreamId
     registered*: bool
+    dead*: bool
 
   LoaderHandle* = ref object
     # Stream for taking input