diff --git a/src/stratifier.c b/src/stratifier.c index 0b7890cd..36d161bf 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -3343,6 +3343,12 @@ out_unlock: return ret; } +/* passthrough subclients have client_ids in the high bits */ +static inline bool passthrough_subclient(const int64_t client_id) +{ + return (client_id > 0xffffffffll); +} + /* Extranonce1 must be set here. Needs to be entered with client holding a ref * count. */ static json_t *parse_subscribe(stratum_instance_t *client, const int64_t client_id, const json_t *params_val) @@ -3386,7 +3392,7 @@ static json_t *parse_subscribe(stratum_instance_t *client, const int64_t client_ session_id = int_from_sessionid(buf); LOGDEBUG("Found old session id %d", session_id); } - if (!ckp->proxy && session_id) { + if (!ckp->proxy && session_id && !passthrough_subclient(client_id)) { if ((client->enonce1_64 = disconnected_sessionid_exists(sdata, session_id, client_id))) { sprintf(client->enonce1, "%016lx", client->enonce1_64); old_match = true;