lib/ocean/zero_log.rb
def trap_int(*sockets)
    sockets.each do |s|
      #puts "Registering at_exit socket closer"
      at_exit { s.setsockopt(ZMQ::LINGER, 0)
                s.close
                #puts "Socket closed" 
              }
    end
  end
#
# Register a trap handler for INT, to clean up and close any
# sockets we might have opened previously.
#
Register a trap handler for INT, to clean up and close any
sockets we might have opened previously.
Register a trap handler for INT to clean up and close any sockets we might have opened previously .
def trap_int(*sockets)
    sockets.each do |s|
      at_exit { s.setsockopt(ZMQ::LINGER, 0)
                s.close
              }
    end
  end
def trap_int ( * sockets ) sockets . each do | s | at_exit { s . setsockopt ( ZMQ :: LINGER , 0 ) s . close } end end
Register a trap handler for INT, to clean up and close any
sockets we might have opened previously.
Register a trap handler for INT to clean up and close any sockets we might have opened previously .
#puts "Registering at_exit socket closer" #puts "Socket closed" 
sockets