File ruby-1.8.x_net_http_close_in_rescue.patch of Package ruby
------------------------------------------------------------------------
r29524 | naruse | 2010-10-18 03:23:48 +0200 (Mon, 18 Oct 2010) | 2 lines
* lib/net/http.rb (transport_request): @socket may be nil.
patched by Egbert Eich [ruby-core:32829]
------------------------------------------------------------------------
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb.orig 2009-11-19 07:32:19.000000000 +0100
+++ lib/net/http.rb 2011-03-04 17:06:02.250249619 +0100
@@ -1057,7 +1057,7 @@ module Net #:nodoc:
res
rescue => exception
D "Conn close because of error #{exception}"
- @socket.close unless @socket.closed?
+ @socket.close if @socket and not @socket.closed?
raise exception
end