about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/loader/loader.nim4
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)