diff --git a/ChangeLog b/ChangeLog index cc55532ce2..021a783537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 18 23:44:20 2004 Minero Aoki + + * lib/net/protocol.rb (rbuf_fill): OpenSSL::SSLSocket has its own + buffer, select(2) might not work. [ruby-dev:24072] + Wed Aug 18 17:10:12 2004 WATANABE Hirofumi * ext/tcltklib/stubs.c (ruby_tcltk_stubs): need to call diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index 1ba18d816b..37b4269f29 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -129,10 +129,9 @@ module Net # :nodoc: private def rbuf_fill - until IO.select([@io], nil, nil, @read_timeout) - raise TimeoutError, "socket read timeout (#{@read_timeout} sec)" - end - @rbuf << @io.sysread(1024) + timeout(@read_timeout) { + @rbuf << @io.sysread(1024) + } end def rbuf_consume(len)