diff --git a/lib/agent.js b/lib/agent.js index a7bdf6f..26b4ac2 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -88,7 +88,7 @@ var start = function start(done) { app._backlog = 2048; apps.push(app); - var secureOptions; + var secureOptions, options; dirModule = path.dirname(module.filename); logger.info('config.enableSecure', config.enableSecure); @@ -114,7 +114,7 @@ var start = function start(done) { fs.statSync(secureOptions.key).isFile() && fs.statSync(secureOptions.cert).isFile()) { - var options = { + options = { key: fs.readFileSync(secureOptions.key), cert: fs.readFileSync(secureOptions.cert) }; @@ -128,7 +128,7 @@ var start = function start(done) { appSec.secOptions = options; appSec.prefix = 'SEC:'; appSec.isSecure = true; - appSec.port = Number(config.agent.port) + 1; + appSec.port = Number(config.agent.httpsPort); apps.push(appSec); } diff --git a/lib/baseConfig.js b/lib/baseConfig.js index e6f8f37..6fea138 100644 --- a/lib/baseConfig.js +++ b/lib/baseConfig.js @@ -179,6 +179,7 @@ exports.agent.maxMessages = 1000; * @type {Number} */ exports.agent.port = 3001; +exports.agent.httpsPort = 3002; /** * Provision timeout