summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-18 14:44:41 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-18 14:44:41 +0000
commit7a29c18c42ef4b3717c34e4a19d927eece3b1ebc (patch)
treedcf700922c65b58bceae52ff7cb6092099c529aa
parent34221ff6e06f58d8b2d414eeb39563a5fc3e1a5f (diff)
downloadruby-7a29c18c42ef4b3717c34e4a19d927eece3b1ebc.tar.gz
ruby-7a29c18c42ef4b3717c34e4a19d927eece3b1ebc.tar.xz
ruby-7a29c18c42ef4b3717c34e4a19d927eece3b1ebc.zip
* lib/net/protocol.rb (rbuf_fill): OpenSSL::SSLSocket has its own buffer, select(2) might not work. [ruby-dev:24072]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/protocol.rb7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cc55532ce..021a78353 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 18 23:44:20 2004 Minero Aoki <aamine@loveruby.net>
+
+ * 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 <eban@ruby-lang.org>
* ext/tcltklib/stubs.c (ruby_tcltk_stubs): need to call
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index 1ba18d816..37b4269f2 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)