[Pkg-javascript-commits] [node-stream-http] 59/208: Re-add close event on response
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 57ce59c207057f127fcc0bac409aee4152caa0cf
Author: John Hiesey <john at hiesey.com>
Date: Mon Jul 13 16:07:46 2015 -0700
Re-add close event on response
---
lib/response.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/response.js b/lib/response.js
index 1252f20..6bec418 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -21,6 +21,11 @@ var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode) {
self.trailers = {}
self.rawTrailers = []
+ // Fake the 'close' event, but only once 'end' fires
+ self.on('end', function () {
+ self.emit('close')
+ })
+
if (mode === 'fetch') {
self._fetchResponse = response
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list