Skip to content

Commit 86d5e6d

Browse files
committed
Merge remote-tracking branch 'origin/emit-data-on-proxy-error'
2 parents bf9ee2e + 16ba33c commit 86d5e6d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) {
188188

189189
// replay the "buffers" Buffer onto the `socket`, since at this point
190190
// the HTTP module machinery has been hooked up for the user
191-
socket.push(buffers);
191+
socket.emit('data', buffers);
192+
socket.emit('end');
192193

193194
// nullify the cached Buffer instance
194195
buffers = null;

0 commit comments

Comments
 (0)