Skip to content

Commit

Permalink
node 0.5 way of closing agent sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
einaros committed Oct 22, 2011
1 parent 796bc9e commit 48140cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ HTTPClient.prototype.request = function (path, opts, fn) {
*/

HTTPClient.prototype.end = function () {
this.agent.sockets.forEach(function (socket) {
socket.end();
var self = this;
Object.keys(this.agent.sockets).forEach(function (socket) {
self.agent.sockets[socket][0]._handle.socket.end();
});
};

Expand Down

0 comments on commit 48140cf

Please sign in to comment.