             [waiter.metrics :as metrics]
             [waiter.utils :as utils])
   (:import (clojure.lang PersistentQueue)
+           (java.io EOFException)
            (java.net ConnectException SocketTimeoutException)
            (java.util.concurrent TimeoutException)
            (org.joda.time DateTime)))

              {:keys [status error]} (async/<! (http/get http-client instance-health-check-url))
              error-flag (cond
                           (instance? ConnectException error) :connect-exception
                           (instance? SocketTimeoutException error) :timeout-exception
                           (instance? TimeoutException error) :timeout-exception)]
          (log-health-check-issues service-instance instance-health-check-url status error)

    (if-not service
      service->service-instances'
      (let [{:strs [health-check-url]} (service-id->service-description-fn (:id service))
            connection-errors #{:connect-exception :hangup-exception :timeout-exception}
            update-unhealthy-instance (fn [instance status error]
                                        (-> instance
                                            (assoc :healthy? false
