mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 09:53:21 +02:00
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 5a77d300dc.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user