Call callback on fetch error

This commit is contained in:
Pavel Djundik 2017-11-25 20:59:12 +02:00
parent 8585dbc6c4
commit 727021be68

View File

@ -175,7 +175,7 @@ function fetch(uri, cb) {
limit = 1024 * 50; limit = 1024 * 50;
} }
}) })
.on("error", function() {}) .on("error", () => cb(null))
.on("data", (data) => { .on("data", (data) => {
length += data.length; length += data.length;
buffers.push(data); buffers.push(data);