From eb0b01c0a69cf7ef24b0277d4449a157253a3037 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 30 May 2022 10:10:12 +0200 Subject: [PATCH] fix #49: don't log socket closed exception --- bb.edn | 2 ++ src/babashka/pods/impl.clj | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 bb.edn diff --git a/bb.edn b/bb.edn new file mode 100644 index 0000000..5196c0e --- /dev/null +++ b/bb.edn @@ -0,0 +1,2 @@ +{:tasks {test {:doc "Run tests" + :task (shell "script/test")}}} diff --git a/src/babashka/pods/impl.clj b/src/babashka/pods/impl.clj index f4f9820..c01ab24 100644 --- a/src/babashka/pods/impl.clj +++ b/src/babashka/pods/impl.clj @@ -168,7 +168,11 @@ (loop [] (let [reply (try (read stdout) (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) (let [id (get reply "id") id (bytes->string id)