Skip to content

Commit

Permalink
Merge pull request #105 from featheredtoast/rabbitmq-close-exceptions
Browse files Browse the repository at this point in the history
rabbitmq try/catch on close
  • Loading branch information
danielsz authored Feb 17, 2017
2 parents c6ea80d + 77c3e9a commit 7b7b6a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/system/components/rabbitmq.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
ch (lch/open conn)]
(assoc component :conn conn :ch ch)))
(stop [component]
(rmq/close ch)
(rmq/close conn)
(try (rmq/close ch)
(catch com.rabbitmq.client.AlreadyClosedException e nil))
(try (rmq/close conn)
(catch com.rabbitmq.client.AlreadyClosedException e nil))
component))

(defn new-rabbit-mq [uri]
Expand Down

0 comments on commit 7b7b6a1

Please sign in to comment.