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/trunk@25097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dd7490d50d
commit
3a4e1d768d
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Sep 26 13:26:55 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]
|
||||
|
||||
Sat Sep 26 08:35:12 2009 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* iseq.c (compile_string): rename to parse_string(), because
|
||||
|
|
|
@ -1124,6 +1124,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
|
||||
|
||||
def begin_transport(req)
|
||||
|
|
Loading…
Reference in a new issue