Browse Source

Check that stratum is already active in initiate_stratum to avoid de-authorising ourselves by subscribing again.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
aa6aa29c4d
  1. 3
      util.c

3
util.c

@ -1170,6 +1170,9 @@ bool initiate_stratum(struct pool *pool)
json_error_t err; json_error_t err;
bool ret = false; bool ret = false;
if (pool->stratum_active)
return true;
s = alloca(RECVSIZE); s = alloca(RECVSIZE);
sprintf(s, "{\"id\": %d, \"method\": \"mining.subscribe\", \"params\": []}", swork_id++); sprintf(s, "{\"id\": %d, \"method\": \"mining.subscribe\", \"params\": []}", swork_id++);

Loading…
Cancel
Save