Commit 54c2a61b authored by Maciej Małecki's avatar Maciej Małecki Committed by Cédric de Saint Martin

[v0.6] `http.Agent` uses different structure for sockets

parent 416b70c8
......@@ -762,9 +762,11 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
HttpProxy.prototype.close = function () {
[this.forward, this.target].forEach(function (proxy) {
if (proxy && proxy.agent) {
proxy.agent.sockets.forEach(function (socket) {
socket.end();
});
for (var host in proxy.agent.sockets) {
proxy.agent.sockets[host].forEach(function (socket) {
socket.end();
});
}
}
});
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment