Closed onyxraven closed 3 months ago
I think this is the culprit. The timeout for the HTTP client used for that API is hard-coded to 10 seconds. I'll make this configurable.
https://github.com/mpawlowski/r2modman-headless/commit/115c445f131c4199f3de9f3532b2ea554402c6ac should let you increase the timeout when fetching metadata using the thunderstore-metadata-timeout
flag.
Nice! it looks like that helped! Thanks
I am just starting to try out your code here to manage a dedicated valheim (lgsm) server's mods.
I ran up against an error immediately:
This is happening in
r2modman.GetPackagesMetadata
where the Get is timing out, though you've set the Timeout on thehttp.Client
.If I use
http.Get
instead of the specific Client, this disables the Timeout, of course, but it does succeed. The json from that endpoint (for valheim) is pretty slow and huge, so perhaps a longer timeout? I tried changing it to60*time.Second
but that didn't seem to do it, so I am trying to figure out whats happening there.Otherwise, so far this looks super useful and I'm happy to help out a bit.