Fix #59: delete port file on exit

This commit is contained in:
Michiel Borkent 2023-01-09 21:21:34 +01:00
parent 16bea5b7db
commit c2e3d8f8b8
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,7 @@
## Unreleased
- [#63](https://github.com/babashka/pods/issues/63): create directory before un-tarring
- #59: delete port file on exit
## v0.2.0

View file

@ -310,7 +310,8 @@
(catch java.net.SocketException _ nil)))
(defn port-file [pid]
(io/file (str ".babashka-pod-" pid ".port")))
(doto (io/file (str ".babashka-pod-" pid ".port"))
(.deleteOnExit)))
(defn read-port [^java.io.File port-file]
(loop []