dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
670 stars 26 forks source link

Downloading music with slow connection times out after 10 seconds #341

Open SnipeXandrej opened 3 months ago

SnipeXandrej commented 3 months ago

When I have poor internet connection and I try to download some music, the downloading will stop after 10 seconds. When the download stops, this error/warning appears in the terminal: context deadline exceeded (Client.Timeout or context cancellation while reading body).

Perhaps this commit that introduces a 10 second connection timeout is unintentionally interrupting any download that takes more than 10 seconds? https://github.com/dweymouth/supersonic/commit/eab7842424562c87814a43a12e42964464af630a

dweymouth commented 3 months ago

Yes you are right - the 10 second timeout will be problematic for downloads. However, removing it everywhere would mean the app would never give up waiting for a response from the server for other endpoints. I probably have to use a new HTTP client with no timeout just for the download API call.