fix(cgi-bin): always wait until job is done before responding

main
Tsu-ba-me 3 years ago
parent 64de564472
commit 2bef084118
  1. 12
      cgi-bin/manage_vnc_pipes

@ -114,14 +114,14 @@ if ($server_uuid)
job_title => "job_0350" job_title => "job_0350"
}); });
if ($is_open) # Wait until the job is complete before continuing.
while($anvil->Job->get_job_details({ job_uuid => $job_uuid }))
{ {
# Wait until the job is complete before fetching for the results. sleep(2);
while($anvil->Job->get_job_details({ job_uuid => $job_uuid })) }
{
sleep(2);
}
if ($is_open)
{
$response_body = get_vnc_pipe_info({ server_uuid => $server_uuid, host_uuid => $host_uuid }); $response_body = get_vnc_pipe_info({ server_uuid => $server_uuid, host_uuid => $host_uuid });
} }
} }

Loading…
Cancel
Save