summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 07:22:19 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 07:22:19 +0000
commit134e2d619a3c4d52021a7ceda17c173e63e6e588 (patch)
tree5e5620fd4a4c9d0ee5f080fbf32344206eefb025 /lib
parentc233358e654fd345820efcdfc4b01d1e34d7e993 (diff)
Mon, 18 Oct 2010 01:23:48 +0000 naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
merge revision(s) 29524: * 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/branches/ruby_1_8@29524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@29865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index cd4d51071f..eba67916c6 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -1056,7 +1056,7 @@ module Net #:nodoc:
end_transport req, 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