     (let [msg (ready replica-version src-peer-id short-id)
           len (sz/serialize control-buffer 0 msg)
           ret (.offer ^Publication publication control-buffer 0 len)]
+      (assert-not-closed ret)
       (debug "Offered ready message:" [ret msg :session-id (.sessionId publication) :site site])
       ret))
   (segment-encoder [this]


          (>= (endpoint-status/min-endpoint-epoch status-mon) endpoint-epoch)
          (let [ret (.offer ^Publication publication ^UnsafeBuffer buf 0 length)]
            (when (pos? ret) (.addAndGet written-bytes length))
            ret)

          :else

          len (sz/serialize control-buffer 0 msg)
          ret (.offer ^Publication publication control-buffer 0 len)] 
      (debug "Pub offer heartbeat" (autil/channel (:address site) (:port site)) ret msg)
      (assert-not-closed ret)
      ret))
  (poll-heartbeats! [this]
    (endpoint-status/poll! status-mon)
