From b1361d5be1446a70ae2119b0aeba761bc667f70c Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 18 Oct 2010 01:20:37 +0000 Subject: * lib/net/http.rb (transport_request): @socket may be nil. patched by Egbert Eich [ruby-core:32829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net') diff --git a/lib/net/http.rb b/lib/net/http.rb index a4e2cee8e5..20c9bb7c92 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1201,7 +1201,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 -- cgit v1.2.3