Set the LastFm http client to terminate idle connections after 30 secs

This change attempts at solving the issue of the application being woken
up after suspension and being unable to talk to the LastFm API (i.e.
throwing plenty of Mint/timeout errors).

The theory is that with this setting the application should quickly
enough restart the pool after waking up.
This commit is contained in:
Claudio Ortolina
2025-03-01 07:25:05 +00:00
parent 545dd808b7
commit 500455481f
+1
View File
@@ -95,6 +95,7 @@ defmodule LastFm.API do
connect_options: [
timeout: 2500
],
pool_max_idle_time: 30_000,
user_agent: config.user_agent
)
|> Req.Request.merge_options(config.req_options)