Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 23, 2014
1 parent 9969aa9 commit a2501bf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions index.js
Expand Up @@ -73,12 +73,7 @@ module.exports = function (url, opts, cb) {

// pipe the response to the proxy if in proxy mode
if (proxy) {
res.pipe(proxy);

res.on('error', function forwardError(error) {
proxy.emit('error', error);
})

res.on('error', proxy.emit.bind(proxy, 'error')).pipe(proxy);
return;
}

Expand Down

0 comments on commit a2501bf

Please sign in to comment.