1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

Give open device ports their own options. Preparing for future refactor.

This commit is contained in:
Simo Kinnunen 2015-04-29 16:38:03 +09:00
parent b3b538c561
commit 105795bec7
4 changed files with 19 additions and 11 deletions

View file

@ -32,7 +32,7 @@ module.exports = function(options) {
// port, we must ensure that we allocate ports in fixed groups.
var ports = options.ports.slice(
0
, options.ports.length - options.ports.length % 4
, options.ports.length - options.ports.length % 2
)
// Information about total devices
@ -303,7 +303,7 @@ module.exports = function(options) {
// Spawn a device worker
function spawn() {
var allocatedPorts = ports.splice(0, 4)
var allocatedPorts = ports.splice(0, 2)
, proc = options.fork(device, allocatedPorts)
, resolver = Promise.defer()