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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user