Fix issue when there is transform errors

Reviewed By: mjesun

Differential Revision: D5843842

fbshipit-source-id: a9c5efde86248a5e4b188012360d8830d2049985
This commit is contained in:
Rafael Oleza 2017-09-15 17:07:58 -07:00 committed by Facebook Github Bot
parent d56cef3493
commit f9526cf486
2 changed files with 4 additions and 2 deletions

View File

@ -46,7 +46,9 @@ class MultipartResponse {
chunk += `${CRLF}--${BOUNDARY}--${CRLF}`;
}
this.res.write(chunk);
if (!this.res.finished) {
this.res.write(chunk);
}
}
writeHead(status, headers) {

View File

@ -938,7 +938,7 @@ class Server {
deltaBundleId: this.optionsHash(options),
});
} catch (error) {
this._handleError(res, this.optionsHash(options), error);
this._handleError(mres, this.optionsHash(options), error);
this._reporter.update({
buildID,