      (catch Throwable t
        (info "Error closing endpoint subscription:" t)))
      (.close conn)
-    (EndpointStatus. peer-config peer-id session-id nil nil nil nil nil nil false))
+    (EndpointStatus. peer-config peer-id session-id nil nil error nil nil nil nil false))
   (info [this]
     [:rv replica-version
      :e epoch

          2 (when (= peer-id (:dst-peer-id message))
              (let [src-peer-id (:src-peer-id message)
                    epoch (:epoch message)
                    peer-status (or (get statuses src-peer-id) (throw (Exception. "Peer should exist.")))
                    prev-epoch (:epoch peer-status)]
                (when-not (or (= epoch (inc prev-epoch))
                              (= epoch prev-epoch))

  (reduce min (map :epoch (vals statuses))))

(deftype EndpointStatus 
  [peer-config peer-id session-id ^Aeron conn ^Subscription subscription error
   ^:unsynchronized-mutable replica-version ^:unsynchronized-mutable epoch 
   ^:unsynchronized-mutable statuses        ^:unsynchronized-mutable ready
   ^:unsynchronized-mutable min-epoch]
