 		          (if (instance? Stop v) nil ;if stop exit loop
 		             (do 
                    (try 
-                      (cond (instance? Reconnected v) (do (recur (:client v))) ;if reconnect recur with the new client
+                      (cond (instance? Reconnected v) (do
+                                                        (prn "Writer received reconnected " (:client v))
+                                                        (recur (:client v))) ;if reconnect recur with the new client
 					             (instance? Pause v) (do (<! (timeout (:time v))) (recur local-client)) ;if pause, wait :time millis, then recur loop
 					             :else
 				                (do ;else write the value to the client channel
+						               (do-write local-client v false conf)))
                            
-						               (do-write local-client v false conf)))
-                           (if (> (.get ^AtomicInteger (:reconnect-count local-client)) 0) (.set ^AtomicInteger (:reconnect-count local-client) 0))
-                      
 							        (catch Exception e (do ;send any exception to the internal-error-ch
 								                            (error "!!!!! Error while writing " e)  
 								                            (go (>! internal-error-ch [e nil]))

                          ))))


(defn start-client [host port {:keys [group read-ch internal-error-ch error-ch write-ch handlers] :as conf 
                                 :or {group (NioEventLoopGroup.) 
                                      read-ch (chan 100) internal-error-ch (chan 100) error-ch (chan 100) write-ch (chan 100)}}]
  "Start a Client instance with read-ch, write-ch and internal-error-ch"
  (try

         internal-error-ch (chan error-buff)
         error-ch (chan error-buff)
         g (NioEventLoopGroup.)
         conf {:group g :write-ch write-ch :read-ch read-ch :internal-error-ch internal-error-ch :error-ch error-ch :handlers handlers
               :reconnect-count (AtomicInteger.) :closed (AtomicBoolean. false)}
         client (start-client host port conf) ]
    
    (if (not client)
