summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-19 05:40:58 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-19 05:40:58 +0000
commit336c45eaa23f6ff9b6861b12629f6adee682a48e (patch)
tree782c405435f1f370346104d09caec7068080aab7
parent0ac2587d0942d57d52df2d777caca06062454197 (diff)
merge revision(s) 35422:
* lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed. [ruby-dev:45541] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/drb/ssl.rb6
-rw-r--r--version.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fb0c5a2493..6b18dc3b3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
diff --git a/version.h b/version.h
index 0562db75f6..2d6f76e993 100644
--- a/version.h
+++ b/version.h
@@ -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