We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bb8e899 + bf8b0f7 commit cb8c1f6Copy full SHA for cb8c1f6
1 file changed
request.js
@@ -893,7 +893,7 @@ Request.prototype.onRequestResponse = function (response) {
893
}
894
})
895
896
- response.on('end', function () {
+ response.once('end', function () {
897
self._ended = true
898
899
@@ -965,7 +965,7 @@ Request.prototype.onRequestResponse = function (response) {
965
self._destdata = true
966
self.emit('data', chunk)
967
968
- responseContent.on('end', function (chunk) {
+ responseContent.once('end', function (chunk) {
969
self.emit('end', chunk)
970
971
responseContent.on('error', function (error) {
0 commit comments