Sha256: b0b05745adec779802cb0c52d2e89deadac45ba547f0367facf65ceb687cc0c2

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

class Sphinx::BufferedIO < Net::BufferedIO # :nodoc:
  BUFSIZE = 1024 * 16

  if RUBY_VERSION < '1.9.1'
    def rbuf_fill
      begin
        @rbuf << @io.read_nonblock(BUFSIZE)
      rescue Errno::EWOULDBLOCK
        retry unless @read_timeout
        if IO.select([@io], nil, nil, @read_timeout)
          retry
        else
          raise Timeout::Error, 'IO timeout'
        end
      end
    end
  end

  def setsockopt(*args)
    @io.setsockopt(*args)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sphinx-0.9.10.2043 lib/sphinx/buffered_io.rb