        :peering-handshake (do
                             (info (:id @state) " accepting peer connection from: " (:src handshake))
                             (when-not (get-in @state [:peers (:src handshake) :socket])
+                              ;; TODO: revisit this, not sure why we can't just overwrite it
                               (swap! state assoc-in [:peers (:src handshake) :socket] s))
                             (s/connect s (:rx-chan @state)))
 

     (io/decode-stream s protocol))))

(defn client
  [host port]
  (assert host "host is nil")
  (assert port "port is nil")

    (catch Exception e
      (warn e "caught exception in connect to peer")
      state)))

(defn- send-peer-packet [state p]
  (let [peer-id (:dst p)]
