From ca7f294e9a48e81127d6f6323804782df1dfcd1a Mon Sep 17 00:00:00 2001 From: cjus Date: Wed, 24 May 2017 12:23:40 -0400 Subject: [PATCH] Update to hydra 1.4.6 and Removal of maxSockets override --- index.js | 12 ++---------- package.json | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 46670a0..c0b48fe 100755 --- a/index.js +++ b/index.js @@ -285,7 +285,7 @@ class HydraExpress { return hydra.init(this.config) .then((config) => { this.config = config; - return Promise.series(this.registeredPlugins, plugin => plugin.setConfig(config)); + return Promise.series(this.registeredPlugins, (plugin) => plugin.setConfig(config)); }) .then(() => hydra.registerService()) .then((_serviceInfo) => { @@ -293,7 +293,7 @@ class HydraExpress { this.log('start', `${hydra.getServiceName()} (v.${hydra.getInstanceVersion()}) server listening on port ${this.config.hydra.servicePort}`); this.log('info', `Using environment: ${this.config.environment}`); this.initService(); - return Promise.series(this.registeredPlugins, plugin => plugin.onServiceReady()); + return Promise.series(this.registeredPlugins, (plugin) => plugin.onServiceReady()); }) .then((..._results) => { return Promise.delay(2000); @@ -375,14 +375,6 @@ class HydraExpress { app.set('port', this.config.servicePort); - if (this.config.environment !== 'development') { - this.config.maxSockets = this.config.maxSockets || 500; - if (this.config.maxSockets) { - // increase max socket when used outside of development - http.globalAgent.maxSockets = this.config.maxSockets; - } - } - this.server = http.createServer(app); /** diff --git a/package.json b/package.json index a222ff9..e725e66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydra-express", - "version": "1.4.5", + "version": "1.4.6", "description": "A module which wraps Hydra and ExpressJS to provide an out of the box microservice which can support API routes and handlers.", "author": { "name": "Carlos Justiniano" @@ -42,7 +42,7 @@ "body-parser": "1.17.1", "cors": "2.8.3", "express": "4.15.3", - "hydra": "1.3.11", + "hydra": "1.4.6", "helmet": "3.6.0", "moment": "2.18.1", "response-time": "2.3.2"