diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-18 14:44:41 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-18 14:44:41 +0000 |
commit | b79d77197f17778a9a63a9b048bd22194418007b (patch) | |
tree | dcf700922c65b58bceae52ff7cb6092099c529aa /lib/net/protocol.rb | |
parent | 1d1ad956cb33755c80f3d112408044faef047d3e (diff) | |
download | ruby-b79d77197f17778a9a63a9b048bd22194418007b.tar.gz |
* lib/net/protocol.rb (rbuf_fill): OpenSSL::SSLSocket has its own buffer, select(2) might not work. [ruby-dev:24072]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r-- | lib/net/protocol.rb | 7 |
1 files changed, 3 insertions, 4 deletions
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) |