From 80fae1ebf329c9c62367bf66d72e49fad14a09e6 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Thu, 29 Sep 2016 15:25:59 -0600 Subject: [PATCH] No change in logic Fix indent and add brackets --- src/srun/libsrun/launch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/srun/libsrun/launch.c b/src/srun/libsrun/launch.c index 4df960ed6a5..fdbd6a5a12e 100644 --- a/src/srun/libsrun/launch.c +++ b/src/srun/libsrun/launch.c @@ -307,16 +307,17 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, job->step_ctx = slurm_step_ctx_create_no_alloc( &job->ctx_params, job->stepid); } else { - if (opt.immediate) + if (opt.immediate) { step_wait = MAX(1, opt.immediate - difftime(time(NULL), srun_begin_time)) * 1000; - else + } else { /* Wait 60 to 70 seconds for response */ step_wait = (getpid() % 10) * 1000 + 60000; - job->step_ctx = slurm_step_ctx_create_timeout( + job->step_ctx = slurm_step_ctx_create_timeout( &job->ctx_params, step_wait); + } } if (job->step_ctx != NULL) { if (i > 0) -- GitLab