Skip to content
Snippets Groups Projects
Unverified Commit c059d8d5 authored by Alexander Solovyov's avatar Alexander Solovyov Committed by GitHub
Browse files

do not print stacktrace when client closes connection too early (#40834)

parent 321e2d0d
Branches change-filter-type
No related tags found
No related merge requests found
......@@ -16,7 +16,8 @@
(:import
(clojure.core.async.impl.channels ManyToManyChannel)
(java.io OutputStream)
(metabase.async.streaming_response StreamingResponse)))
(metabase.async.streaming_response StreamingResponse)
(org.eclipse.jetty.io EofException)))
(set! *warn-on-reflection* true)
......@@ -139,7 +140,10 @@
(fn result [result]
(when (= (:status result) :completed)
(log/debug "Finished writing results; closing results writer.")
(qp.si/finish! results-writer result)
(try
(qp.si/finish! results-writer result)
(catch EofException e
(log/error e "Client closed connection prematurely")))
(u/ignore-exceptions
(.flush os)
(.close os)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment