lib/httpx/selector.rb in httpx-0.11.3 vs lib/httpx/selector.rb in httpx-0.12.0

- old
+ new

@@ -67,9 +67,14 @@ (w ||= []) << io if WRITE_INTERESTS.include?(interests) end if @selectables.empty? @selectables = selectables + + # do not run event loop if there's nothing to wait on. + # this might happen if connect failed and connection was unregistered. + return if (!r || r.empty?) && (!w || w.empty?) + break else @selectables = [*selectables, @selectables] end rescue StandardError