diff --git a/index.js b/index.js index 1c50116..5c4460a 100644 --- a/index.js +++ b/index.js @@ -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.destroy() ); // TODO reuse sockets req.onSocket(socket); } else { const err = new Error(