Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5294830 commit f07e7afCopy full SHA for f07e7af
service.js
@@ -1,6 +1,5 @@
1
-'use strict';
2
-
3
const http = require('http');
+const https = require('https');
4
const request = require('superagent');
5
const _ = require('lodash');
6
@@ -49,8 +48,10 @@ module.exports = function setup(serviceConfig) {
49
48
50
logger.info(`using ${serviceConfig.getName()} service at ${serviceConfig.getBaseUrl()}`);
51
+ const connection_library = serviceConfig.getBaseUrl().startsWith('https') ? https : http;
52
+
53
// create one HTTP agent with keep alives enabled per service instance
- const agent = new http.Agent({
54
+ const agent = new connection_library.Agent({
55
keepAlive: true
56
});
57
0 commit comments