               (.addFirst dispatch-queue [:resolve (ask op slot) address]))))
       (op reply))))
 
-(defn read! [client ^SelectionKey k]
+(defn handle-read! [client ^SelectionKey k]
   (let [^SocketChannel channel (.channel k)
         {:keys [^ConcurrentLinkedDeque read-queue ^ByteBuffer read-buffer] :as conn} (.attachment k)]
     (loop [n (.read channel (doto read-buffer

                        (debug "key is not valid:" selected-key)
                        (do
                          (when (.isReadable selected-key)
                            (read! client selected-key))
                          (when (and (.isValid selected-key) (.isWritable selected-key))
                            (write! client selected-key))
                          (when (and (.isValid selected-key) (.isConnectable selected-key))
                            (connect! client selected-key))))))
                  (recur))
                (recur))))
        (warn "Selector is closed")))

        (fail-connection client conn ex)
        (.cancel k)))))

(defn rand-seed [client]
  (-> client
      :seeds
