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;
}
})
.on("error", function() {})
.on("error", () => cb(null))
.on("data", (data) => {
length += data.length;
buffers.push(data);