lib/cucumber/wire_support/connection.rb in cucumber-0.6.1 vs lib/cucumber/wire_support/connection.rb in cucumber-0.6.2

- old
+ new

@@ -34,13 +34,18 @@ def send_data_to_socket(data) Timeout.timeout(@config.timeout) { socket.puts(data) } end def fetch_data_from_socket(timeout) - raw_response = Timeout.timeout(timeout) { socket.gets } + raw_response = + if timeout == :never + socket.gets + else + Timeout.timeout(timeout) { socket.gets } + end WirePacket.parse(raw_response) end - + def socket @socket ||= TCPSocket.new(@config.host, @config.port) rescue Errno::ECONNREFUSED => exception raise(ConnectionError, "Unable to contact the wire server at #{@config.host}:#{@config.port}. Is it up?") end \ No newline at end of file