Skip to content

Commit

Permalink
Don't allow jobs with zero ttr.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Rarick committed Feb 24, 2008
1 parent 5ea9f7c commit 3559424
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/protocol.txt
Expand Up @@ -129,6 +129,8 @@ It inserts a job into the queue.
to run this job. This time is counted from the moment a worker reserves
this job. If the worker does not delete, release, or bury the job within
<ttr> seconds, the job will time out and the server will release the job.
The minimum ttr is 1. If the client sends 0, the server will silently
increase the ttr to 1.

- <bytes> is an integer (currently must be < 2**16) indicating the size of
the job body, not including the trailing "\r\n".
Expand Down
2 changes: 1 addition & 1 deletion prot.c
Expand Up @@ -797,7 +797,7 @@ dispatch_cmd(conn c)

conn_set_producer(c);

c->in_job = make_job(pri, delay, ttr, body_size + 2);
c->in_job = make_job(pri, delay, ttr ? : 1, body_size + 2);

fill_extra_data(c);

Expand Down

0 comments on commit 3559424

Please sign in to comment.