         (is (ready-for? (poll-channels [[ssh :read]] 1357) ssh :read))))))
 
 (defn accept-connection [socket]
-  (let [s1 (log/spy (.accept socket))]
+  (let [s1 (.accept socket)]
     (when s1
+      (when (log/may-log? :debug)
+        ;; no need to getRemoteAddress if we don't have debug logging
+        (log/debug (str "accepted connection from " (.getRemoteAddress s1))))
       (doto s1
         (.configureBlocking false)))))
 

  (.. listener socket getLocalPort))

(defn update-listener [listener config]
  (if-let [req-addr (log/spy (get-in config [:config :listen-address]))]
    (let [req-port (:port (parse-address req-addr))
          old-port (and listener (get-port listener))]
      (if (and listener
               (= old-port req-port))
        (log/spy listener)
        (let [new-l (ServerSocketChannel/open)]
          (and listener (.close listener))
          (doto (log/spy new-l)
            (.configureBlocking false)
            (.bind (InetSocketAddress. req-port))))))
    nil))

            [clojure.test :as test :refer [deftest testing is]]
            [clojure.java.io :as io]
            [clojure.set :as set]
            [taoensso.timbre :as log :refer [debug info]]
            [clojure.core.async :as async
             :refer [<! <!! go chan >! close! alts!]]))

