Skip to content

Commit

Permalink
get rid of extraneous response "close" handler, which was causing fre…
Browse files Browse the repository at this point in the history
…quent multiple callbacks. somewhat related to #52
  • Loading branch information
natevw committed Oct 20, 2018
1 parent 6d39861 commit 208b103
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fermata.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ fermata._nodeTransport = function (request, callback) {
callback(err || null, {status:res.statusCode, headers:fermata._normalize(res.headers), data:responseData});
}
res.on('end', finish);
// TODO: is this handler correct?
// (may be a confusion between event on http.ServerResponse vs. http.IncomingMessage)
res.on('close', function () {
finish(new Error("Connection dropped."));
});
});
return req;
};
Expand Down

0 comments on commit 208b103

Please sign in to comment.