diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-12 14:08:03 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-12 14:08:03 +0100 |
commit | 2ac31dd859c84697d108c88dd1b22b5ffa5beb95 (patch) | |
tree | ce58ea045d9670730386deb7a724c702a4bebdc6 /src | |
parent | 75865752dd0e0db44916fa493b78e3761279359c (diff) | |
download | chawan-2ac31dd859c84697d108c88dd1b22b5ffa5beb95.tar.gz |
loader: unregister input streams on EOF
if recvData returns 0, it must be treated the same as a broken pipe.
Diffstat (limited to 'src')
-rw-r--r-- | src/loader/loader.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim index e4d7b1ca..70f84043 100644 --- a/src/loader/loader.nim +++ b/src/loader/loader.nim @@ -257,8 +257,8 @@ proc handleRead(ctx: LoaderContext; handle: LoaderHandle; let buffer = newLoaderBuffer() try: let n = handle.istream.recvData(buffer) - if n == 0: - break + if n == 0: # EOF + return hrrUnregister var si = 0 if handle.parser != nil: si = handle.parseHeaders(buffer) |