1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

A little more work for each connection, but this should be slightly more robust

git-svn-id: file:///home/svn/framework3/trunk@8895 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2010-03-24 14:50:25 +00:00
parent e28e4ac923
commit 756e00c3bb

View File

@ -60,6 +60,10 @@ class APIRequest
attr_reader :trace
def initialize(req, url)
prepare_http_client
end
def prepare_http_client
@retry_count = 0
@retry_count_max = 10
@time_out = 30
@ -83,6 +87,7 @@ class APIRequest
@conn_tries = 0
begin
prepare_http_client
resp, data = @http.post(@uri.path, @req, @headers)
@res = parse_xml(data)