              (catch Exception e
                ;; do nothing
                ))
-            (recur conf @(:continue conf)))
+            (recur conf (.get (:continue conf))))
           (do
             (log/infof "db-watcher[%s] terminating" dbname)))))))
 
 (defn start-watcher [wname conf]
-  (let [control-atom   (atom true)
+  (let [control-atom   (AtomicBoolean. true)
         watcher-config {:conf     conf
                         :error    (atom nil)
                         :continue control-atom

(defn stop-watcher [name]
  (let [conf (get @db-watchers name)]
    (when conf
      (reset! (:continue conf) false)
      (.interrupt (:thread conf))
      (swap! db-watchers dissoc name))))


          dbname     (-> conf :dbconf :subname)
          sleep-time (:sleep-time conf 1000)]
      (loop [conf     conf
             continue (.get (:continue conf))]
        (if continue
          (do
            (log/infof "db-watcher[%s] polling" dbname)
