From c7417bdd870eaf635ae8c5864d4e98aa63c968b4 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 5 Dec 2015 22:55:20 -0800 Subject: [PATCH] oh, did you want more than the first packet? Ooops... fixed --- app.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app.js b/app.js index 35ad727..b94e68a 100644 --- a/app.js +++ b/app.js @@ -25,10 +25,10 @@ module.exports = function (opts) { addLen = livereload.length; } - res.__end = res.end; res.__write = res.write; res.write = function (data, enc, cb) { if (this.headersSent) { + this.__write(data, enc, cb); return; } @@ -44,11 +44,6 @@ module.exports = function (opts) { this.__write(livereload); this.__write(data, enc, cb); }; - res.end = function () { - - - res.__end(); - }; serve(req, res, function (err) { if (err) { return done(err); } index(req, res, done);