From 2a6ba79e9aecb47014cae46d1f715d6479233a31 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 2 Feb 2022 23:50:43 +0100 Subject: [PATCH] :sparkles: Ignore EOF errors on writting streamed response --- backend/src/app/http/middleware.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/app/http/middleware.clj b/backend/src/app/http/middleware.clj index 3845fe839..153ddc727 100644 --- a/backend/src/app/http/middleware.clj +++ b/backend/src/app/http/middleware.clj @@ -90,6 +90,9 @@ (with-open [bos (buffered-output-stream output-stream buffer-size)] (let [tw (t/writer bos opts)] (t/write! tw data))) + (catch org.eclipse.jetty.io.EofException _cause + ;; Do nothing, EOF means client closes connection abruptly + nil) (catch Throwable cause (l/warn :hint "unexpected error on encoding response" :cause cause))))))