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 | 42c7bb4d6aa4b5a3351c033dfa785ff51fa29e2f (patch) | |
| tree | 07e886ccd61e2771da631666cefcbf30f6397ac7 | |
| parent | 62c59ce0609b227dfb54462e859f6fb8b52c8e0c (diff) | |
| download | ruby-42c7bb4d6aa4b5a3351c033dfa785ff51fa29e2f.tar.gz ruby-42c7bb4d6aa4b5a3351c033dfa785ff51fa29e2f.tar.xz ruby-42c7bb4d6aa4b5a3351c033dfa785ff51fa29e2f.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/branches/ruby_1_8@6786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/net/protocol.rb | 11 |
2 files changed, 10 insertions, 6 deletions
@@ -1,3 +1,8 @@ +Wed Aug 18 23:41:33 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 316f5e51a..ac6bce105 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -2,8 +2,8 @@ # = net/protocol.rb # #-- -# Copyright (c) 1999-2003 Yukihiro Matsumoto -# Copyright (c) 1999-2003 Minero Aoki +# Copyright (c) 1999-2004 Yukihiro Matsumoto +# Copyright (c) 1999-2004 Minero Aoki # # written and maintained by Minero Aoki <aamine@loveruby.net> # @@ -193,10 +193,9 @@ module Net # :nodoc: private def rbuf_fill - until IO.select([@socket], nil, nil, @read_timeout) - raise TimeoutError, "socket read timeout (#{@read_timeout} sec)" - end - @rbuf << @socket.sysread(1024) + timeout(@read_timeout) { + @rbuf << @socket.sysread(1024) + } end def rbuf_moveto( dest, len ) |
