oh, did you want more than the first packet? Ooops... fixed
This commit is contained in:
parent
01b5a56acd
commit
c7417bdd87
7
app.js
7
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);
|
||||
|
|
Loading…
Reference in New Issue