Browse Source

Send version mask on init client only on proxies.

master
Con Kolivas 7 years ago
parent
commit
455673c4ca
  1. 6
      src/stratifier.c

6
src/stratifier.c

@ -6486,11 +6486,11 @@ static void stratum_send_version_mask(sdata_t *sdata, stratum_instance_t *client
} }
/* Send diff first when sending the first stratum template after subscribing */ /* Send diff first when sending the first stratum template after subscribing */
static void init_client(stratum_instance_t *client, const int64_t client_id) static void init_client(ckpool_t *ckp, stratum_instance_t *client, const int64_t client_id)
{ {
sdata_t *sdata = client->sdata; sdata_t *sdata = client->sdata;
if (client->vmask) if (ckp->proxy && client->vmask)
stratum_send_version_mask(client->sdata, client); stratum_send_version_mask(client->sdata, client);
stratum_send_diff(sdata, client); stratum_send_diff(sdata, client);
stratum_send_update(sdata, client_id, true); stratum_send_update(sdata, client_id, true);
@ -6617,7 +6617,7 @@ static void parse_method(ckpool_t *ckp, sdata_t *sdata, stratum_instance_t *clie
json_object_set_new_nocheck(val, "error", json_null()); json_object_set_new_nocheck(val, "error", json_null());
stratum_add_send(sdata, val, client_id, SM_SUBSCRIBERESULT); stratum_add_send(sdata, val, client_id, SM_SUBSCRIBERESULT);
if (likely(client->subscribed)) if (likely(client->subscribed))
init_client(client, client_id); init_client(ckp, client, client_id);
return; return;
} }

Loading…
Cancel
Save