]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Close the FD network link when we do a hangup on the storage side
authorEric Bollengier <eric@baculasystems.com>
Wed, 26 Aug 2020 12:52:53 +0000 (14:52 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Mar 2022 14:36:17 +0000 (15:36 +0100)
bacula/src/filed/backup.c
bacula/src/filed/restore.c
bacula/src/stored/append.c
bacula/src/stored/read.c

index 17b03693703bef9d402f9b99dd42791d543bb835..0373166b1e662e04766b4820761cd01a64ca35b4 100644 (file)
@@ -817,6 +817,7 @@ bool process_and_send_data(bctx_t &bctx)
 
    /* Debug code: check if we must hangup or blowup */
    if (handle_hangup_blowup(jcr, 0, jcr->ReadBytes)) {
+      sd->close();
       goto err;
    }
 
index 261c642305494498fe0dcf629a266a5c28455613..c82f37ae8e4d4bd99ba3d28089bd3e539a797909 100644 (file)
@@ -1040,6 +1040,7 @@ void do_restore(JCR *jcr)
 
       /* Debug code: check if we must hangup or blowup */
       if (handle_hangup_blowup(jcr, jcr->JobFiles, jcr->JobBytes)) {
+         sd->close();
          goto get_out;
       }
 
index be6dc6c9d154687ef888f69128eef786a3ee9c55..e8d27a44dfeeb71b5e3b639bacf9b10283ed1556 100644 (file)
@@ -235,6 +235,7 @@ fi_checked:
 
          /* Debug code: check if we must hangup or blowup */
          if (handle_hangup_blowup(jcr, jcr->JobFiles, jcr->JobBytes)) {
+            fd->close();
             return false;
          }
          Dmsg4(850, "before write_rec FI=%d SessId=%d Strm=%s len=%d\n",
index c60f5b34d33d4d67b51c8c6da859af99efa3f76b..d11b9913510ba7576789966315fa001923a9dd61 100644 (file)
@@ -219,6 +219,7 @@ static bool read_record_cb(DCR *dcr, DEV_RECORD *rec)
 
    /* Debug code: check if we must hangup or blowup */
    if (handle_hangup_blowup(jcr, jcr->JobFiles, jcr->JobBytes)) {
+      fd->close();
       return false;
    }