From ede25e8c9e4ae19d7210bbc5034172787ed1e7fe Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 14 Mar 2017 17:40:34 -0700 Subject: [PATCH] cpuminer: fix stop. --- lib/mining/cpuminer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mining/cpuminer.js b/lib/mining/cpuminer.js index 07e9aedb..a869f0d6 100644 --- a/lib/mining/cpuminer.js +++ b/lib/mining/cpuminer.js @@ -98,6 +98,7 @@ CPUMiner.prototype._close = co(function* close() { */ CPUMiner.prototype.start = function start() { + assert(!this.running, 'Miner is already running.'); this._start().catch(util.nop); }; @@ -206,7 +207,7 @@ CPUMiner.prototype.stop = co(function* stop() { * @returns {Promise} */ -CPUMiner.prototype.stop = co(function* stop() { +CPUMiner.prototype._stop = co(function* _stop() { if (!this.running) return;