oh, did you want more than the first packet? Ooops... fixed

This commit is contained in:
AJ ONeal 2015-12-05 22:55:20 -08:00
parent 01b5a56acd
commit c7417bdd87
1 changed files with 1 additions and 6 deletions

7
app.js
View File

@ -25,10 +25,10 @@ module.exports = function (opts) {
addLen = livereload.length; addLen = livereload.length;
} }
res.__end = res.end;
res.__write = res.write; res.__write = res.write;
res.write = function (data, enc, cb) { res.write = function (data, enc, cb) {
if (this.headersSent) { if (this.headersSent) {
this.__write(data, enc, cb);
return; return;
} }
@ -44,11 +44,6 @@ module.exports = function (opts) {
this.__write(livereload); this.__write(livereload);
this.__write(data, enc, cb); this.__write(data, enc, cb);
}; };
res.end = function () {
res.__end();
};
serve(req, res, function (err) { serve(req, res, function (err) {
if (err) { return done(err); } if (err) { return done(err); }
index(req, res, done); index(req, res, done);