lib/rubydns/resolver.rb in rubydns-0.9.0 vs lib/rubydns/resolver.rb in rubydns-0.9.1

- old
+ new

@@ -93,10 +93,13 @@ @logger.debug "[#{message.id}] Sending request to server #{server.inspect}" if @logger begin response = nil + # This may be causing a problem, perhaps try: + # after(timeout) { socket.close } + # https://github.com/celluloid/celluloid-io/issues/121 timeout(request_timeout) do response = try_server(request, server) end if valid_response(message, response) @@ -163,9 +166,11 @@ def try_tcp_server(request, host, port) begin socket = TCPSocket.new(host, port) rescue Errno::EALREADY + # This is a hack to work around faulty behaviour in celluloid-io: + # https://github.com/celluloid/celluloid/issues/436 raise IOError.new("Could not connect to remote host!") end StreamTransport.write_chunk(socket, request.packet)