@autofleet/network 1.2.9-alpha-7 → 1.2.9-alpha-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -44,8 +44,12 @@ module.exports = class Network {
|
|
|
44
44
|
constructor(settings = {}) {
|
|
45
45
|
this.settings = merge(defaultSettings, settings);
|
|
46
46
|
if (this.settings.keepAlive) {
|
|
47
|
-
const keepaliveAgent = new Agent(
|
|
48
|
-
|
|
47
|
+
const keepaliveAgent = new Agent({
|
|
48
|
+
maxSockets: 1000
|
|
49
|
+
});
|
|
50
|
+
const keepaliveHttpsAgent = new HttpsAgent({
|
|
51
|
+
maxSockets: 1000
|
|
52
|
+
});
|
|
49
53
|
this.settings.httpAgent = keepaliveAgent;
|
|
50
54
|
this.settings.httpsAgent = keepaliveHttpsAgent;
|
|
51
55
|
delete this.settings.keepAlive;
|
|
@@ -64,9 +68,9 @@ module.exports = class Network {
|
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
this.axios = axios.create(this.settings);
|
|
67
|
-
this.addRetry(settings);
|
|
71
|
+
// this.addRetry(settings);
|
|
68
72
|
this.buildClassHttpMethods();
|
|
69
|
-
this.addLogs();
|
|
73
|
+
// this.addLogs();
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
addRetry(settings) {
|