fix #49: don't log socket closed exception

This commit is contained in:
Michiel Borkent 2022-05-30 10:10:12 +02:00
parent b9f3a28555
commit eb0b01c0a6
2 changed files with 7 additions and 1 deletions

2
bb.edn Normal file
View file

@ -0,0 +1,2 @@
{:tasks {test {:doc "Run tests"
:task (shell "script/test")}}}

View file

@ -168,7 +168,11 @@
(loop [] (loop []
(let [reply (try (read stdout) (let [reply (try (read stdout)
(catch java.io.EOFException _ (catch java.io.EOFException _
::EOF))] ::EOF)
(catch java.net.SocketException e
(if (= "Socket closed" (ex-message e))
::EOF
(throw e))))]
(when-not (identical? ::EOF reply) (when-not (identical? ::EOF reply)
(let [id (get reply "id") (let [id (get reply "id")
id (bytes->string id) id (bytes->string id)