Skip to content
Browse files

forget the context once it is closed

  • Loading branch information...
1 parent 1c64927 commit e70504f43cd8f45e9b8aa52d925419214f64defe Brian Dunn committed with Hashrocket Workstation Jul 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/flatware.rb
View
4 lib/flatware.rb
@@ -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.
Something went wrong with that request. Please try again.