From 1d15e8e3d744813f40b17ffe1ae06a1d96a3877a Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Tue, 21 Jul 2015 15:38:07 +0900 Subject: [PATCH] Since minicap is quite complicated and gets restarted often, perhaps it's best if we let changes fully propagate before restarting it again. There was a problem with someone changing rotation so quickly that pid retrieval failed, which means that stopping was sort of iffy, which then caused various problems. The pid retrieval process was improved in 5a77d300dcf3bb1bb1b2a291b8280271d94dc3b8. --- lib/units/device/plugins/screen/stream.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/units/device/plugins/screen/stream.js b/lib/units/device/plugins/screen/stream.js index e819c45a..4316677f 100644 --- a/lib/units/device/plugins/screen/stream.js +++ b/lib/units/device/plugins/screen/stream.js @@ -40,7 +40,6 @@ module.exports = syrup.serial() this.frameConfig = config this.readable = false this.needsReadable = false - this.starter = Promise.resolve(true) this.failCounter = new FailCounter(3, 10000) this.failCounter.on('exceedLimit', this._failLimitExceeded.bind(this)) this.failed = false @@ -72,7 +71,7 @@ module.exports = syrup.serial() case FrameProducer.STATE_STOPPED: if (this.desiredState.next() === FrameProducer.STATE_STARTED) { this.runningState = FrameProducer.STATE_STARTING - this.starter = this._startService().bind(this) + this._startService().bind(this) .then(function(out) { this.output = new RiskyStream(out) .on('unexpectedEnd', this._outputEnded.bind(this)) @@ -145,7 +144,6 @@ module.exports = syrup.serial() switch (this.runningState) { case FrameProducer.STATE_STARTED: case FrameProducer.STATE_STARTING: - this.starter.cancel() this.desiredState.push(FrameProducer.STATE_STOPPED) this.desiredState.push(FrameProducer.STATE_STARTED) this._ensureState()