From f61d839b30f4ed17357793abd7df65c72e7ce493 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 20 Sep 2016 15:11:47 +1000 Subject: [PATCH] Fix missing initial stratum notify in proxy mode --- src/stratifier.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index ab22bd9e..304a5928 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -5961,8 +5961,10 @@ static void suggest_diff(ckpool_t *ckp, stratum_instance_t *client, const char * } /* Send diff first when sending the first stratum template after subscribing */ -static void init_client(sdata_t *sdata, const stratum_instance_t *client, const int64_t client_id) +static void init_client(const stratum_instance_t *client, const int64_t client_id) { + sdata_t *sdata = client->sdata; + stratum_send_diff(sdata, client); stratum_send_update(sdata, client_id, true); } @@ -6079,7 +6081,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(sdata, client, client_id); + init_client(client, client_id); return; }