Permalink
Browse files

rescue server.close

  • Loading branch information...
1 parent d6fbeb4 commit c4ebfe8db8337a42d19aff31d4f36d71089d97ea @benmyles committed Jan 17, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/carrot.rb
View
@@ -40,10 +40,14 @@ def server
end
def stop
- server.close
- @server = nil
- @queues = nil
- @exchanges = nil
+ begin
+ server.close
+ rescue Exception => e
+ ensure
+ @server = nil
+ @queues = nil
+ @exchanges = nil
+ end
end
alias :reset :stop

0 comments on commit c4ebfe8

Please sign in to comment.