mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +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:
parent
4dc8772e1b
commit
396cfbad7f
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ module.exports = function(options) {
|
||||||
// port, we must ensure that we allocate ports in fixed groups.
|
// port, we must ensure that we allocate ports in fixed groups.
|
||||||
var ports = options.ports.slice(
|
var ports = options.ports.slice(
|
||||||
0
|
0
|
||||||
, options.ports.length - options.ports.length % 2
|
, options.ports.length - options.ports.length % 4
|
||||||
)
|
)
|
||||||
|
|
||||||
// Information about total devices
|
// Information about total devices
|
||||||
|
@ -317,7 +317,7 @@ module.exports = function(options) {
|
||||||
// Spawn a device worker
|
// Spawn a device worker
|
||||||
function spawn() {
|
function spawn() {
|
||||||
var allocatedPorts = ports.splice(0, 4)
|
var allocatedPorts = ports.splice(0, 4)
|
||||||
, proc = options.fork(device, allocatedPorts)
|
, proc = options.fork(device, allocatedPorts.slice())
|
||||||
, resolver = Promise.defer()
|
, resolver = Promise.defer()
|
||||||
|
|
||||||
function exitListener(code, signal) {
|
function exitListener(code, signal) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue