Browse Source

Update diff on all stratifier data but send diff only to clients bound to the current subproxy

master
Con Kolivas 10 years ago
parent
commit
319d0943fc
  1. 6
      src/stratifier.c

6
src/stratifier.c

@ -1312,10 +1312,6 @@ static void update_diff(ckpool_t *ckp, const char *cmd)
LOGNOTICE("Got updated diff for proxy %d", id);
proxy = subproxy_by_id(sdata, id, subid);
if (proxy->parent != current_proxy(sdata)) {
LOGINFO("Diff from backup proxy");
return;
}
/* We only really care about integer diffs so clamp the lower limit to
* 1 or it will round down to zero. */
@ -1338,6 +1334,8 @@ static void update_diff(ckpool_t *ckp, const char *cmd)
HASH_ITER(hh, sdata->stratum_instances, client, tmp) {
if (client->proxyid != id)
continue;
if (client->subproxyid != subid)
continue;
if (client->diff > diff) {
client->diff = diff;
stratum_send_diff(sdata, client);

Loading…
Cancel
Save