diff --git a/index.js b/index.js index 3ee9abc..295ab8d 100644 --- a/index.js +++ b/index.js @@ -156,6 +156,8 @@ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { connectReq.removeAllListeners() socket.removeAllListeners() + options.request.emit('tunnel_connect_response', res) + if (res.statusCode === 200) { assert.equal(head.length, 0) debug('tunneling connection has established')