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;
|
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);
|
||||||
|
|
Loading…
Reference in New Issue