perplexes / m2r

Mongrel2 Connection Adapter - Ruby Encrusted Steel-Reinforced Fist
MIT License
90 stars 11 forks source link

Implement error handling in Connecion#receive and Connection#deliver #45

Closed paneq closed 11 years ago

paneq commented 12 years ago

Handle ZMQ errors somehow

    def receive
      @request_socket.recv_string(msg = "")
      @request_parser.parse(msg)
    end

    def deliver(uuid, connection_ids, data)
      msg = "#{uuid} #{TNetstring.dump([*connection_ids].join(' '))} #{data}"
      @response_socket.send_string(msg)
    end