class Net::SSH::Connection::Session

def ev_do_calculate_rw_wait(wait)

we also return the max wait
Returns the file descriptors the event loop should wait for read/write events,
def ev_do_calculate_rw_wait(wait)
  r = listeners.keys
  w = r.select { |w2| w2.respond_to?(:pending_write?) && w2.pending_write? }
  [r, w, io_select_wait(wait)]
end