 +         if (is_bnet_error(fd)) {
 +            Jmsg(jcr, M_FATAL, 0, _("Network error with FD during %s: ERR=%s\n"),
 +                 job_type_to_str(jcr->get_JobType()), fd->bstrerror());
-          }
-          if (job_canceled(jcr)) {
--            break;
 +            OK=false;
           }
        }

-   Dmsg1(400, "after wait for sd. use=%d\n", jcr->use_count());
+   Dmsg1(400, "wait for sd and fd. use=%d\n", jcr->use_count());
+   /* Get status from SD and FD */
+   wait_for_job_termination(jcr);   /* TODO: don't expect the EndJob message */
+   Dmsg1(400, "after wait for sd and fd. use=%d\n", jcr->use_count());
    return false;
 }
 
@@ -343,7 +343,7 @@
  *   are done, we return the job status.
  * Also used by restore.c
  */
-int wait_for_job_termination(JCR *jcr, int timeout)
+int wait_for_job_termination(JCR *jcr)
 {
    int32_t n = 0;
    BSOCK *fd = jcr->file_bsock;
@@ -353,40 +353,43 @@
    uint64_t JobBytes = 0;
    int VSS = 0;
    int Encrypt = 0;

 
 /* backup.c */
-extern int wait_for_job_termination(JCR *jcr, int timeout=0);
+extern int wait_for_job_termination(JCR *jcr, bool expect_EndJob=true);
 extern bool do_backup_init(JCR *jcr);
 extern bool do_backup(JCR *jcr);
 extern void backup_cleanup(JCR *jcr, int TermCode);
