Clamp lower diff to 1 in proxy mode
This commit is contained in:
parent
d526eb8a76
commit
6d70aac3a2
@ -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…
Reference in New Issue
Block a user