Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
close free sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
tareksha committed Jul 2, 2018
1 parent f5fcafd commit cd52d40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Agent.prototype.addRequest = function addRequest(req, _opts) {
// responsibility for this `req` to the Agent from here on
socket.addRequest(req, opts);
} else if (socket) {
socket.on('free', () => socket.end() ); // TODO reuse sockets
req.onSocket(socket);
} else {
const err = new Error(
Expand Down

0 comments on commit cd52d40

Please sign in to comment.