    ^:unsynchronized-mutable batch]
   sub/Subscriber
   (start [this]
-    (let [error-handler (reify ErrorHandler
-                          (onError [this x] 
-                            (reset! error x)
-                            (.addAndGet errors 1)))
-          media-driver-dir (:onyx.messaging.aeron/media-driver-dir peer-config)
+    (let [media-driver-dir (:onyx.messaging.aeron/media-driver-dir peer-config)
           sinfo [dst-task-id slot-id site]
           lost-sessions (atom #{})
-          ctx (cond-> (Aeron$Context.)
-                error-handler (.errorHandler error-handler)
+          ctx (cond-> (.errorHandler (Aeron$Context.)
+                                     (new-error-handler error error-counter))
                 media-driver-dir (.aeronDirectoryName ^String media-driver-dir))
           conn (Aeron/connect ctx)
           channel (autil/channel peer-config)

   site
   batch-size
   ^AtomicLong read-bytes 
   ^AtomicLong errors
   error
   ^bytes bs 
   channel

          status {}
          new-subscriber (sub/add-assembler 
                          (Subscriber. peer-id ticket-counters peer-config dst-task-id
                                       slot-id site batch-size read-bytes error-counter error bs channel
                                       conn sub lost-sessions sources short-id-status-pub 
                                       status-pubs nil nil nil status nil))]
      (info "Created subscriber" (sub/info new-subscriber))
