diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-15 17:50:47 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-15 17:50:47 +0000 |
commit | a579d8bf6818cd979efc441f9bcec849b2d37b3e (patch) | |
tree | 42fd914ee129fd5ee85e152c6032341a2d0f3a61 /ext/openssl/lib/openssl/buffering.rb | |
parent | e65affb360af11decb81be8b19dde7fc25ff9672 (diff) |
* ext/openssl/ossl_ssl.c (ossl_ssl_read, ossl_ssl_write): should
call rb_sys_fail instead of rasing SSLError if SSL_ERROR_SYSCALL
occured.
* ext/openssl/lib/openssl/buffering.rb (Buffering#fill_rbuff):
should rescue Errno::EAGAIN.
* ext/openssl/lib/openssl/buffering.rb (Buffering#each): fix typo.
suggested by Brian Ollenberger.
* ext/openssl/lib/openssl/ssl.rb: set non-blocking flag to the
underlying IO.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/openssl/buffering.rb')
-rw-r--r-- | ext/openssl/lib/openssl/buffering.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb index 31dcdf1f9a..7ad12d7203 100644 --- a/ext/openssl/lib/openssl/buffering.rb +++ b/ext/openssl/lib/openssl/buffering.rb @@ -32,6 +32,8 @@ module Buffering @rbuffer = "" unless defined? @rbuffer begin @rbuffer << self.sysread(BLOCK_SIZE) + rescue Errno::EAGAIN + retry rescue EOFError @eof = true end @@ -84,7 +86,7 @@ module Buffering end def each(eol=$/) - while line = self.gets(eol?) + while line = self.gets(eol) yield line end end |