Skip to content

Commit 66fdc52

Browse files
committed
Added linkedlist dep.
1 parent 0bce9d9 commit 66fdc52

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"watch": "^0.16.0"
6363
},
6464
"dependencies": {
65-
"extend": "^2.0.1"
65+
"extend": "^2.0.1",
66+
"linkedlist": "^1.0.1"
6667
}
6768
}

src/util/request.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var http = require('http');
33
var parseUrl = require('url').parse;
44
var once = require('./once');
55
var joinPath = require('path').join;
6+
var LinkedList = require('linkedlist');
67

78
function rawCopy(obj) {
89
var data = {};
@@ -17,7 +18,7 @@ function rawCopy(obj) {
1718
module.exports = function (baseUrl, agent, agentOptions) {
1819
if (!agent && http.Agent) agent = new http.Agent(agentOptions); // server only
1920

20-
var queue = [];
21+
var queue = new LinkedList();
2122
var maxTasks = typeof agent.maxSockets === 'number' ? agent.maxSockets * 2 : Infinity;
2223
var activeTasks = 0;
2324
var baseUrlParts = rawCopy(parseUrl(baseUrl));

0 commit comments

Comments
 (0)