[前][次][番号順一覧][スレッド一覧]

ruby-changes:14040

From: shyouhei <ko1@a...>
Date: Thu, 19 Nov 2009 15:33:31 +0900 (JST)
Subject: [ruby-changes:14040] Ruby:r25851 (ruby_1_8_7): merge revision(s) 25098:

shyouhei	2009-11-19 15:32:19 +0900 (Thu, 19 Nov 2009)

  New Revision: 25851

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25851

  Log:
    merge revision(s) 25098:
    * lib/net/http.rb (transport_request): Handle timeout error by
      closing socket if exception raised. [ruby-core:20976]

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/lib/net/http.rb
    branches/ruby_1_8_7/version.h

Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 25850)
+++ ruby_1_8_7/ChangeLog	(revision 25851)
@@ -1,3 +1,8 @@
+Thu Nov 19 15:27:17 2009  Marc-Andre Lafortune  <ruby-core@m...>
+
+	* lib/net/http.rb (transport_request): Handle timeout error by
+	  closing socket if exception raised. [ruby-core:20976]
+
 Wed Nov 18 14:14:38 2009  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* ext/openssl/ossl_config.c (ossl_config_add_value_m,
Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 25850)
+++ ruby_1_8_7/version.h	(revision 25851)
@@ -1,15 +1,15 @@
 #define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2009-11-18"
+#define RUBY_RELEASE_DATE "2009-11-19"
 #define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20091118
-#define RUBY_PATCHLEVEL 212
+#define RUBY_RELEASE_CODE 20091119
+#define RUBY_PATCHLEVEL 213
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
 #define RUBY_VERSION_TEENY 7
 #define RUBY_RELEASE_YEAR 2009
 #define RUBY_RELEASE_MONTH 11
-#define RUBY_RELEASE_DAY 18
+#define RUBY_RELEASE_DAY 19
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8_7/lib/net/http.rb
===================================================================
--- ruby_1_8_7/lib/net/http.rb	(revision 25850)
+++ ruby_1_8_7/lib/net/http.rb	(revision 25851)
@@ -1055,6 +1055,10 @@
       end_transport req, res
 
       res
+    rescue => exception
+      D "Conn close because of error #{exception}"
+      @socket.close unless @socket.closed?
+      raise exception
     end
 
     private

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]