Browse Source

Clamp lower diff to 1 in proxy mode

master
Con Kolivas 10 years ago
parent
commit
6d70aac3a2
  1. 5
      src/stratifier.c

5
src/stratifier.c

@ -879,6 +879,11 @@ static void update_diff(ckpool_t *ckp)
json_dblcpy(&diff, val, "diff");
json_decref(val);
/* We only really care about integer diffs so clamp the lower limit to
* 1 or it will round down to zero. */
if (unlikely(diff < 1))
diff = 1;
ck_wlock(&workbase_lock);
old_diff = proxy_base.diff;
current_workbase->diff = proxy_base.diff = diff;

Loading…
Cancel
Save