Skip to content

Commit

Permalink
Fix integrant resume-key
Browse files Browse the repository at this point in the history
  • Loading branch information
Deraen committed Aug 28, 2019
1 parent d39c917 commit 558c10a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/less4clj/integrant.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
(defmethod ig/init-key ::less4clj [_ options]
(api/start options))

(defmethod ig/halt-key! ::less4clj [this options]
(api/stop this))
(defmethod ig/halt-key! ::less4clj [_ watcher]
(api/stop watcher))

(defmethod ig/suspend-key! ::less4clj [this options]
(defmethod ig/suspend-key! ::less4clj [_ watcher]
nil)

(defmethod ig/resume-key ::less4clj [key opts old-opts old-impl]
(if (= opts old-opts)
old-impl
(do
(ig/halt-key! key old-opts)
(ig/halt-key! key old-impl)
(ig/init-key key opts))))

0 comments on commit 558c10a

Please # to comment.