 
 (defn start
   [options]
-  (let [conn (connect (:url options) (:token options))]
-    (future (s/consume publish-events (->> conn (s/buffer 100))))))
+  (let [conn (connect (:url options) (:token options))
+        _ (reset! rtm-conn conn)]
+    (t/every conn-reset-delay #(reset-conn options))
+    (future (s/consume publish-events (->> @rtm-conn (s/buffer 100))))
+    @rtm-conn))

            [aleph.http :as http]
            [cheshire.core :as json]
            [manifold.stream :as s]
            [manifold.bus :as bus]))

(def event-bus (bus/event-bus))

(defn- get-connection-map
  [url token]


(defn connect
  [url token]
  (-> (get-rtm-ws-url url token)
       get-rtm-ws-connection))

(defn- reset-conn
  [options]
  (reset! rtm-conn (connect (:url options) (:token options))))

(defn subscribe
  [type func]
