Skip to content

Commit

Permalink
Merge pull request #162 from bareos/dev/arogge/bareos-17.2/TT4200443
Browse files Browse the repository at this point in the history
stored: fix corner-case crash during job cancel
  • Loading branch information
arogge committed Mar 27, 2019
2 parents 8a9008d + e32e005 commit c809330
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dird/sd_cmds.c
Expand Up @@ -668,8 +668,10 @@ bool cancel_storage_daemon_job(UAContext *ua, JCR *jcr, bool interactive)
if (!interactive) {
jcr->sd_canceled = true;
}
jcr->store_bsock->set_timed_out();
jcr->store_bsock->set_terminated();
if (jcr->store_bsock) {
jcr->store_bsock->set_timed_out();
jcr->store_bsock->set_terminated();
}
sd_msg_thread_send_signal(jcr, TIMEOUT_SIGNAL);

/*
Expand Down

0 comments on commit c809330

Please sign in to comment.