]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix bug 2476 -- copy/migration jobs fail when waiting for a new Volume
authorMartin Simmons <martin@lispworks.com>
Fri, 24 May 2019 13:54:44 +0000 (15:54 +0200)
committerKern Sibbald <kern@sibbald.com>
Fri, 24 May 2019 13:56:49 +0000 (15:56 +0200)
bacula/src/stored/wait.c

index 300759549985e847f0850fabf9b5353ab71bb91e..d3cd58e3eb0915ab9ebace7cb7380e231ead311c 100644 (file)
@@ -106,8 +106,12 @@ int wait_for_sysop(DCR *dcr)
       /* Note, this always triggers the first time. We want that. */
       if (me->heartbeat_interval) {
          if (now - last_heartbeat >= me->heartbeat_interval) {
-            /* send heartbeats */
-            if (jcr->file_bsock) {
+            /* Send Heartbeats
+               Note when sd_client is set, the SD is acting as an FD,
+                bug the SD has code to receive heartbeats, so we skip
+                sending them.
+            */
+            if (jcr->file_bsock && !(jcr->is_JobType(JT_BACKUP) && jcr->sd_client)) {
                jcr->file_bsock->signal(BNET_HEARTBEAT);
                Dmsg0(dbglvl, "Send heartbeat to FD.\n");
             }