|
|
@ -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 */ |
|
|
|
/* 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_diff(sdata, client); |
|
|
|
stratum_send_update(sdata, client_id, true); |
|
|
|
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()); |
|
|
|
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(sdata, client, client_id); |
|
|
|
init_client(client, client_id); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|