mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb (transport_request): Handle timeout error by closing socket if exception raised. [ruby-core:20976]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4460a5e160
commit
8cdc1fca44
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Sep 26 13:32:00 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* lib/net/http.rb (transport_request): Handle timeout error by
|
||||
closing socket if exception raised. [ruby-core:20976]
|
||||
|
||||
Fri Sep 25 04:34:08 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* lib/rational.rb (#+, #-, #/, #**, #<=>): Return correct error
|
||||
|
|
|
@ -1055,6 +1055,10 @@ module Net #:nodoc:
|
|||
end_transport req, res
|
||||
|
||||
res
|
||||
rescue => exception
|
||||
D "Conn close because of error #{exception}"
|
||||
@socket.close unless @socket.closed?
|
||||
raise exception
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue