         stream-complete-rate
         (timers/start-stop-time!
           stream
-          (when-let [close-message (async/<! request-close-promise-chan)]
-            (let [[source close-code status-code-or-exception close-message] close-message]
+          (when-let [close-message-wrapper (async/<! request-close-promise-chan)]
+            (let [[source close-code status-code-or-exception close-message] close-message-wrapper]
               (log/info "websocket connections requested to be closed due to" source close-code close-message)
               (counters/dec! requests-streaming)
               ;; explicitly close the client connection if backend triggered the close

(defn- successful?
  "Returns whether the status represents a successful status code."
  [status]
  (= 1000 status))

(defn process-response!
  "Processes a response resulting from a websocket request.

                    (au/timed-offer! upload-chan send-data streaming-timeout-ms))
                (recur (+ bytes-streamed bytes-read))
                (do
                  (log/error "unable to stream to" dest-name {:cid (cid/get-correlation-id), :bytes-streamed bytes-streamed})
                  (meters/mark! stream-back-pressure-meter)
                  (deliver reservation-status-promise stream-error-type)
                  (async/>! request-close-chan stream-error-type))))
