Merge pull request #1742 from thelounge/xpaw/fetch-error-callback

Call callback on fetch error
This commit is contained in:
Jérémie Astori 2017-11-25 15:17:03 -05:00 committed by GitHub
commit 553c24c909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);