From 7663a35e4f676e4f1f140e8ad816e58e6705d90b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 13 May 2017 13:10:23 +0200 Subject: Make TFTP upload more robust --- bbot/agent.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.1