 				     (timeout timeout-ms)]))))
 		    
   ([{:keys [error-ch]}]
-  "Reads from the error-ch and blocks if no data is available"
-    (if error-ch (<!! error-ch))))
-
-
-
-(defn- do-write [^Client client write-lock-ch ^bytes v close-after-write {:keys [internal-error-ch] :as conf}]
+    (when error-ch (<!! error-ch))))
+
+
+
+(defn- do-write
   "Writes to the channel, this operation is non blocking and a exception listener is added to the write's ChannelFuture
    to send any errors to the internal-error-ch"
+   [^Client client write-lock-ch ^bytes v close-after-write {:keys [internal-error-ch] :as conf}]
    (let [^Channel channel (-> client ^ChannelFuture (:channel-f) ^Channel (.channel))]
      (if (.isOpen channel)
 	     (let [ch-f (-> channel ^ChannelFuture (.writeAndFlush v) (.addListener ^ChannelFutureListener (exception-listener write-lock-ch v conf)))]

                              )))
	      )))

(defn exception-listener
  "Returns a GenericFutureListener instance
   that on completion checks the Future, if any exception
   an error is sent to the error-ch"
  [write-lock-ch v {:keys [internal-error-ch]}]
  (reify GenericFutureListener
    (operationComplete [this f]
       ;(go (>! write-lock-ch 1)) ;release write lock
