Permalink
Browse files

forget the context once it is closed

  • Loading branch information...
Brian Dunn Hashrocket Workstation
Brian Dunn authored and Hashrocket Workstation committed Jul 13, 2012
1 parent 1c64927 commit e70504f43cd8f45e9b8aa52d925419214f64defe
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/flatware.rb
View
@@ -24,6 +24,7 @@ def socket(*args)
def close
sockets.each &:close
context.close
+ @context = nil
end
def log(*message)
@@ -40,8 +41,7 @@ def verbose?
private
def context
- return @context if @context
- @context = ZMQ::Context.new
+ @context ||= ZMQ::Context.new
end
def sockets

0 comments on commit e70504f

Please sign in to comment.