[PR #5143] [CLOSED] ignore "ECONNABORTED" in 'downloadLibraryFile' function #4441

Closed
opened 2026-04-25 00:19:45 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/5143
Author: @takov751
Created: 3/22/2026
Status: Closed

Base: masterHead: master


📄 Description

Brief summary

Downloading library item via the apps are failing early mostly when delay too high between client and server.
My assumption is that very likely the default value for timeout for connections is low.

Which issue is fixed?

fixing #3803

In-depth Description

Very small change. Basically making sure that "ECONNABORTED" error is ignored by resolve() that given Promise. This way the downloading continues.
I used github copilot Claude model to help me patch it quickly. It is awful , i don't like it and only sharing to inspire some more reasonable solution. BUT IT SEEMS TO WORK.

How have you tested this?

Friends of mine downloaded a larger 600+ MB audiobook from a different country with larger delay. He was patient Zero where the issue surfaced first.
Above that I had issue with audiobooth downloading books over slow mobile data connection


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/5143 **Author:** [@takov751](https://github.com/takov751) **Created:** 3/22/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary Downloading library item via the apps are failing early mostly when delay too high between client and server. My assumption is that very likely the default value for timeout for connections is low. ## Which issue is fixed? fixing #3803 ## In-depth Description Very small change. Basically making sure that "ECONNABORTED" error is ignored by resolve() that given Promise. This way the downloading continues. I used github copilot Claude model to help me patch it quickly. It is awful , i don't like it and only sharing to inspire some more reasonable solution. BUT IT SEEMS TO WORK. ## How have you tested this? Friends of mine downloaded a larger 600+ MB audiobook from a different country with larger delay. He was patient Zero where the issue surfaced first. Above that I had issue with audiobooth downloading books over slow mobile data connection --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:19:45 +02:00
adam closed this issue 2026-04-25 00:19:45 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4441