From 455673c4ca0144147bf9a7ef25cfdeeb4827d09e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 20 Feb 2018 00:28:01 +1100 Subject: [PATCH] Send version mask on init client only on proxies. --- src/stratifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 343a825a..bd4afa09 100644 --- a/src/stratifier.c +++ b/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 */ -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; - if (client->vmask) + if (ckp->proxy && client->vmask) stratum_send_version_mask(client->sdata, client); stratum_send_diff(sdata, client); 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()); stratum_add_send(sdata, val, client_id, SM_SUBSCRIBERESULT); if (likely(client->subscribed)) - init_client(client, client_id); + init_client(ckp, client, client_id); return; }