lib/httpx/selector.rb in httpx-1.0.2 vs lib/httpx/selector.rb in httpx-1.1.0

- old
+ new

@@ -71,11 +71,11 @@ # TODO: what to do if there are no selectables? readers, writers = IO.select(r, w, nil, interval) if readers.nil? && writers.nil? && interval - [*r, *w].each { |io| io.raise_timeout_error(interval) } + [*r, *w].each { |io| io.handle_socket_timeout(interval) } return end rescue IOError, SystemCallError @selectables.reject!(&:closed?) retry @@ -108,10 +108,10 @@ when :rw then io.to_io.wait(interval, :read_write) when nil then return end unless result || interval.nil? - io.raise_timeout_error(interval) + io.handle_socket_timeout(interval) return end # raise HTTPX::TimeoutError.new(interval, "timed out while waiting on select") yield io