Skip to content

Commit

Permalink
Identify more issues with piping and 'request()' (it goes deeper- see r…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Nov 27, 2017
1 parent b3d9321 commit 7320a43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/get-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ module.exports = {


extendedDescription:
// 'This method determines whether a URL can be reached via a GET request and whether it responds with a 2xx status code. '+
// 'If so, it waits until it\'s able to parse out response headers, then returns a Readable stream representing the response '+
// 'body. '+
'The responsibility for any other validations/error handling falls on the consumer of the stream. However, this method '+
'_DOES_ bind an `error` event handler on the stream to prevent emitted error events from crashing the process; ensuring that this '+
'method is agnostic of its userland environment. If you plan to write code which uses the readable stream returned by this method '+
Expand Down Expand Up @@ -121,6 +118,7 @@ module.exports = {
// Also bind a one-time error handler specifically to catch a few specific errors that can
// occur up-front.
stream.once('error', function (err) {
console.log(alreadyExited, err,'ahhh');
// When receiving subsequent read errors on this Readable stream after
// the first (or after we've exited successfully), the best we can do
// is remain silent.
Expand Down

0 comments on commit 7320a43

Please sign in to comment.