Skip to content

Commit 176c681

Browse files
author
dnolen
committed
CLJS-1824: transit cache feature leaks files
1 parent 5cc8f04 commit 176c681

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/clojure/cljs/analyzer.cljc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,8 +3393,8 @@
33933393
cached-ns (case ext
33943394
"edn" (edn/read-string (slurp cache))
33953395
"json" (let [{:keys [reader read]} @transit]
3396-
(read (reader (io/input-stream cache) :json
3397-
transit-read-opts))))]
3396+
(with-open [is (io/input-stream cache)]
3397+
(read (reader is :json transit-read-opts)))))]
33983398
(when (or *verbose* (:verbose opts))
33993399
(util/debug-prn "Reading analysis cache for" (str res)))
34003400
(swap! env/*compiler*

0 commit comments

Comments
 (0)