diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-13 13:10:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-13 13:10:23 +0200 |
commit | 7663a35e4f676e4f1f140e8ad816e58e6705d90b (patch) | |
tree | c3c51dd30d1badfea8b232e1487f7fb61251e7a0 | |
parent | 3f7031d3a122b93e0bda40ffb82a8cefb4c94285 (diff) |
Make TFTP upload more robust
-rw-r--r-- | bbot/agent.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bbot/agent.cxx b/bbot/agent.cxx index 80ff475..3c7b248 100644 --- a/bbot/agent.cxx +++ b/bbot/agent.cxx @@ -220,6 +220,11 @@ bootstrap_machine (const dir_path& md, l3 ([&]{trace << "completed bootstrap in " << bootstrap_to - to << "s";}); + // The file may have been created but not yet (completely) uploaded. + // So we wait for one second without any TFTP activity. + // + while (tftpd.serve ((to = 1))) ; + // Shut the machine down cleanly. // if (!m->shutdown ((to = shutdown_to))) @@ -688,6 +693,11 @@ try l3 ([&]{trace << "completed build in " << build_to - to << "s";}); + // The file may have been created but not yet (completely) uploaded. + // So we wait for one second without any TFTP activity. + // + while (tftpd.serve ((to = 1))) ; + // Parse the result manifest. // try |