Closed aw-was-here closed 1 year ago
Hey @aw-was-here
Thanks for the feature request!
I don't have to time at the moment to look into this or implement it but would this feature look something like this
client.timeout(10) // 10 seconds
or maybe with separate connect and read timeouts?
client.connect_timeout(15)
client.read_timeout(10)
OR
client.timeout(connect=15, read=10)
That's a great question. For the things I'm working on, total transaction time is important since it drives a live visual display and listener interaction. Delays are extremely noticeable so don't want to spend more than 3 seconds waiting for discogs to connect and give an answer. If the client can pipeline requests, then breaking it up into connect/read(or write?) timeout would make much more sense. Thanks!
Fyi this is now released! https://github.com/joalla/discogs_client/releases/tag/v2.6
Awesome! Thanks!
For time-critical applications, it would be great if all of the request calls could use a provided timeout.