diff --git a/ChangeLog b/ChangeLog index af8909e240..0cba420a6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 18 10:19:00 2010 NARUSE, Yui + + * lib/net/http.rb (transport_request): @socket may be nil. + patched by Egbert Eich [ruby-core:32829] + Mon Oct 18 09:57:28 2010 NARUSE, Yui * sprintf.c (BSD_vfprintf): wrong padding arround prefix and 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