         listener
         (let [new-l (ServerSocketChannel/open)]
           (and listener (.close listener))
-          (doto new-l (.bind (InetSocketAddress. req-port))))))
+          (doto new-l
+            (.configureBlocking false)
+            (.bind (InetSocketAddress. req-port))))))
     nil))
 
 (defn combined-config-watcher [prefix]

    h))

(defn run-server [prefix]
  (let [config-ch (merlion.core/combined-config-watcher prefix)
        shutdown (chan)]
    (go
      (loop [backends {}
             listener nil
             config {}]
        (let [timestamp (- (millepoch-time-now) (* 10 1000))
              healthy (healthy-backends timestamp backends)
              [val ch] (alts!
                        (conj
                         (map #(vector (:chan %) listener)
                              healthy)
                         config-ch
                         shutdown))]
          (cond (= ch config-ch)
                (recur (update-backends backends val)
                       (update-listener listener val)
                       val)

                (= ch shutdown)
                (do (println "quit") (.close listener))

            Selector SelectionKey])
  (:require [merlion.etcd :as etcd]
            [clojure.string :as str]
            [clojure.test :as test :refer [deftest testing is]]
            [clojure.java.io :as io]
            [clojure.pprint :refer [pprint]]
            [clojure.set :as set]
            [clojure.core.async :as async
             :refer [<! <!! go chan >! close! alts!]]))

(defn s->millepoch-time [s]
  (.getTimeInMillis (clojure.instant/read-instant-calendar s)))

(defn millepoch-time-now []
  (.getTime (java.util.Date.)))


(defn server-socket
  "Opens a ServerSocketChannel listening on the specified TCP `port` then
