mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
Allocated ports were not being released properly due to fork() now consuming the ports. Additionally fixes port pool grouping. Fixes #138.
This commit is contained in:
@@ -31,7 +31,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 % 2
|
||||
, options.ports.length - options.ports.length % 4
|
||||
)
|
||||
|
||||
// Information about total devices
|
||||
@@ -317,7 +317,7 @@ module.exports = function(options) {
|
||||
// Spawn a device worker
|
||||
function spawn() {
|
||||
var allocatedPorts = ports.splice(0, 4)
|
||||
, proc = options.fork(device, allocatedPorts)
|
||||
, proc = options.fork(device, allocatedPorts.slice())
|
||||
, resolver = Promise.defer()
|
||||
|
||||
function exitListener(code, signal) {
|
||||
|
||||
Reference in New Issue
Block a user