aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent/agent.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-20 14:42:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-10-06 15:40:07 +0200
commit6a5c8fce4051476f398191b15763e144ea358424 (patch)
treeadb4ee63084ee3e06f871a429355448599dcb521 /bbot/agent/agent.cxx
parente2293b22dfd26c5612c7c2d090d3be9392d82af9 (diff)
Add support for controller request retries, connection timeout
Diffstat (limited to 'bbot/agent/agent.cxx')
-rw-r--r--bbot/agent/agent.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index d345472..c8e316a 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -1029,7 +1029,10 @@ try
curl::post,
u,
"--header", "Content-Type: text/manifest",
- "--max-time", ops.request_timeout ());
+ "--retry", ops.request_retries (),
+ "--retry-max-time", ops.request_timeout (),
+ "--max-time", ops.request_timeout (),
+ "--connect-timeout", ops.connect_timeout ());
// This is tricky/hairy: we may fail hard parsing the output before
// seeing that curl exited with an error and failing softly.
@@ -1184,7 +1187,10 @@ try
curl::post,
u,
"--header", "Content-Type: text/manifest",
- "--max-time", ops.request_timeout ());
+ "--retry", ops.request_retries (),
+ "--retry-max-time", ops.request_timeout (),
+ "--max-time", ops.request_timeout (),
+ "--connect-timeout", ops.connect_timeout ());
// This is tricky/hairy: we may fail hard writing the input before
// seeing that curl exited with an error and failing softly.