diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/drb/ssl.rb | 6 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sat May 19 14:40:49 2012 Tanaka Akira <akr@fsij.org> + + * lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed. + [ruby-dev:45541] + Sat May 19 14:39:50 2012 Tanaka Akira <akr@fsij.org> * lib/webrick/utils.rb: fix fcntl call. diff --git a/lib/drb/ssl.rb b/lib/drb/ssl.rb index 17e2a73d85..ebd648b256 100644 --- a/lib/drb/ssl.rb +++ b/lib/drb/ssl.rb @@ -177,7 +177,11 @@ module DRb break if (@acl ? @acl.allow_socket?(soc) : true) soc.close end - ssl = @config.accept(soc) + begin + ssl = @config.accept(soc) + ensure + soc.close if $! + end self.class.new(uri, ssl, @config, true) rescue OpenSSL::SSL::SSLError warn("#{__FILE__}:#{__LINE__}: warning: #{$!.message} (#{$!.class})") if @config[:verbose] @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 218 +#define RUBY_PATCHLEVEL 219 #define RUBY_RELEASE_DATE "2012-05-19" #define RUBY_RELEASE_YEAR 2012 |
