Skip to content

Commit

Permalink
Break a race between wreckrun's state change and initial jcb notifica…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
dongahn committed May 28, 2015
1 parent 251ae18 commit 15b6f87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/libjsc/jstatctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,13 +798,13 @@ static int new_job_cb (const char *key, int64_t val, void *arg, int errnum)
Jadd_int64 (ss, JSC_STATE_PAIR_NSTATE, (int64_t) js);
json_object_object_add (jcb, JSC_STATE_PAIR, ss);

if (invoke_cbs (h, nj, jcb, errnum) < 0) {
flux_log (h, LOG_ERR, "new_job_cb: failed to invoke callbacks");
}
if (reg_jobstate_hdlr (h, path, (KVSSetStringF *) job_state_cb) == -1) {
flux_log (h, LOG_ERR, "new_job_cb: reg_jobstate_hdlr: %s",
strerror (errno));
}
if (invoke_cbs (h, nj, jcb, errnum) < 0) {
flux_log (h, LOG_ERR, "new_job_cb: failed to invoke callbacks");
}

done:
/* always return 0 so that reactor won't return */
Expand Down

0 comments on commit 15b6f87

Please sign in to comment.