Fixes to jscProfilerMiddleware

Reviewed By: bnham

Differential Revision: D3691098

fbshipit-source-id: dbadda69ff0b6a8d9d349b33c45234ff4f8c3b65
This commit is contained in:
Dan Caspi 2016-08-10 06:33:21 -07:00 коммит произвёл Facebook Github Bot 8
Родитель c74938e72e
Коммит 0cc3b4b079
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -78,7 +78,7 @@ class TreeTransformator {
const parsedUrl = urlLib.parse(url);
const options = {
host: parsedUrl.hostname,
host: 'localhost',
port: parsedUrl.port,
path: parsedUrl.pathname.replace(/\.bundle$/, '.map') + parsedUrl.search,
};
@ -97,13 +97,11 @@ class TreeTransformator {
if (!sawEnd) {
console.error('Connection terminated prematurely because of: '
+ err.code + ' for url: ' + url);
this.urlResults[url] = null;
callback();
}
});
}).on('error', (err) => {
console.error('Could not get response from: ' + url);
this.urlResults[url] = null;
callback();
});
}