Feature #4560 ยป 0001-lib-net-protocol.rb-avoid-exceptions-in-rbuf_fill.patch
lib/net/protocol.rb | ||
---|---|---|
require 'socket'
|
||
require 'timeout'
|
||
require 'io/wait'
|
||
module Net # :nodoc:
|
||
... | ... | |
BUFSIZE = 1024 * 16
|
||
def rbuf_fill
|
||
if @io.respond_to?(:wait)
|
||
false == @io.wait(@read_timeout) and raise Timeout::Error
|
||
end
|
||
begin
|
||
@rbuf << @io.read_nonblock(BUFSIZE)
|
||
rescue IO::WaitReadable
|