Browse Source

Merge branch 'ssm_from_gbt' into bfgminer

Luke Dashjr 9 years ago
parent
commit
939d20d891
1 changed files with 2 additions and 0 deletions
  1. 2 0
      miner.c

+ 2 - 0
miner.c

@@ -3588,6 +3588,7 @@ static bool work_decode(struct pool *pool, struct work *work, json_t *val)
 		};
 
 		const struct blktmpl_longpoll_req *lp;
+		mutex_lock(&pool->pool_lock);
 		if ((lp = blktmpl_get_longpoll(tmpl)) && ((!pool->lp_id) || strcmp(lp->id, pool->lp_id))) {
 			free(pool->lp_id);
 			pool->lp_id = strdup(lp->id);
@@ -3601,6 +3602,7 @@ static bool work_decode(struct pool *pool, struct work *work, json_t *val)
 			}
 #endif
 		}
+		mutex_unlock(&pool->pool_lock);
 	}
 	else
 	if (unlikely(!jobj_binary(res_val, "data", work->data, sizeof(work->data), true))) {