lib/httpx/selector.rb in httpx-0.15.4 vs lib/httpx/selector.rb in httpx-0.16.0

- old
+ new

@@ -41,13 +41,10 @@ @selectables << io end private - READ_INTERESTS = %i[r rw].freeze - WRITE_INTERESTS = %i[w rw].freeze - def select_many(interval, &block) selectables, r, w = nil # first, we group IOs based on interest type. On call to #interests however, # things might already happen, and new IOs might be registered, so we might @@ -62,11 +59,11 @@ @selectables = [] selectables.each do |io| interests = io.interests - (r ||= []) << io if READ_INTERESTS.include?(interests) - (w ||= []) << io if WRITE_INTERESTS.include?(interests) + (r ||= []) << io if READABLE.include?(interests) + (w ||= []) << io if WRITABLE.include?(interests) end if @selectables.empty? @selectables = selectables