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 authored Jul 2, 2018
1 parent f5fcafd commit 3977996
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 @@ -123,6 +123,7 @@ Agent.prototype.addRequest = function addRequest(req, _opts) {
}

function onsocket(socket) {
socket.on('free', () => socket.end() );
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
Expand Down

0 comments on commit 3977996

Please sign in to comment.