86e0a45c64
A similar thing should be done for KML and Shapefile, but the focus here is making jenkins happy for now
18 lines
353 B
JavaScript
18 lines
353 B
JavaScript
var utils = {};
|
|
|
|
utils.startOnNextPort = function(server, issue, start_port) {
|
|
|
|
var port = start_port || 5555;
|
|
|
|
server.on('error', function(e) {
|
|
console.log("Port " + port + " already in use, retrying");
|
|
utils.startOnNextPort(server, issue, port+1);
|
|
});
|
|
|
|
server.listen(port, '127.0.0.1', issue);
|
|
}
|
|
|
|
module.exports = utils;
|
|
|
|
|