about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/loader/loader.nim2
-rw-r--r--src/local/pager.nim3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim
index e8d29ee2..732336f9 100644
--- a/src/loader/loader.nim
+++ b/src/loader/loader.nim
@@ -1008,6 +1008,8 @@ proc openCachedItem(ctx: LoaderContext; stream: SocketStream;
     w.swrite(ps != nil)
     if ps != nil:
       w.sendAux.add(FileHandle(ps.fd))
+  if ps != nil:
+    ps.sclose()
   stream.sclose()
 
 proc passFd(ctx: LoaderContext; stream: SocketStream; client: ClientData;
diff --git a/src/local/pager.nim b/src/local/pager.nim
index d61f1dd8..2d0b12f4 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -606,6 +606,9 @@ proc loadCachedImage(pager: Pager; container: Container; image: PosBitmap;
       pager.loader.removeCachedItem(cacheId)
       if res.isNone:
         return
+      let response = res.get
+      response.resume()
+      response.close()
       let cacheId = res.get.outputId
       if cachedImage.state == cisCanceled:
         pager.loader.removeCachedItem(cacheId)