mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[v0.6] http.Agent uses different structure for sockets
This commit is contained in:
parent
6655e01642
commit
86b4122323
@ -753,9 +753,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();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user