diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-build-task.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index ff52f6b..06ba4f8 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -2261,13 +2261,15 @@ handle (request& rq, response& rs) { // Just try with the next rebuild. But first, restore the agent's // fingerprint and challenge and reset the task manifest and the - // session that we have prepared. + // session that we may have prepared. // - assert (task_build != nullptr); + if (task_build != nullptr) + b = move (task_build); - agent_fp = move (task_build->agent_fingerprint); - challenge = move (task_build->agent_challenge); - task_build = nullptr; + assert (b != nullptr); // Wouldn't be here otherwise. + + agent_fp = move (b->agent_fingerprint); + challenge = move (b->agent_challenge); task_response = task_response_manifest (); } |