aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/agent/agent.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index c0849c6..d345472 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -238,7 +238,13 @@ bootstrap_machine (const dir_path& md,
for (to = bootstrap_to; to != 0; tftpd.serve (to, 2))
{
if (file_not_empty (mf))
- break;
+ {
+ // Wait for 5 seconds of inactivity. This is our desperate attempt
+ // at handling interrupted uploads.
+ //
+ if (!tftpd.serve (to, 5))
+ break;
+ }
}
if (to == 0)
@@ -729,7 +735,10 @@ try
for (to = build_to; to != 0; tftpd.serve (to, 2))
{
if (file_not_empty (rf))
- break;
+ {
+ if (!tftpd.serve (to, 5))
+ break;
+ }
}
if (to == 0)