 (defn- successful?
   "Returns whether the status represents a successful status code."
   [status]
-  (= 1000 status))
+  (= StatusCode/NORMAL status))
 
 (defn process-response!
   "Processes a response resulting from a websocket request.

                             error-code)

                           :else :unknown)]
          (async/>! request-close-promise-chan [source close-code return-code-or-exception close-message]))))))

(defn- close-client-session!

        stream-complete-rate
        (timers/start-stop-time!
          stream
          (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
