[GH-ISSUE #209] spclient requests should have a maximum request limit #137

Closed
opened 2026-02-28 14:25:42 +03:00 by kerem · 1 comment
Owner

Originally created by @tooxo on GitHub (Sep 14, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/209

The spclient should have a request limit, because there are some errors which can occur here, which will block the function indefinitely by always repeating the request (e.g. dns lookup issues, network outages).

github.com/devgianlu/go-librespot@8d888e4e46/spclient/spclient.go (L84-L103)

Originally created by @tooxo on GitHub (Sep 14, 2025). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/209 The spclient should have a request limit, because there are some errors which can occur here, which will block the function indefinitely by always repeating the request (e.g. dns lookup issues, network outages). https://github.com/devgianlu/go-librespot/blob/8d888e4e46e3966c9c1750bcaec3478f24e521b3/spclient/spclient.go#L84-L103
kerem 2026-02-28 14:25:42 +03:00
Author
Owner

@devgianlu commented on GitHub (Sep 19, 2025):

The retries should be stopped by backoff.WithContext. If the context is canceled, it doesn't retry. This assumes that the caller isn't using a random context without a deadline, which is probably untrue.

<!-- gh-comment-id:3312943701 --> @devgianlu commented on GitHub (Sep 19, 2025): The retries should be stopped by `backoff.WithContext`. If the context is canceled, it doesn't retry. This assumes that the caller isn't using a random context without a deadline, which is probably untrue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#137
No description provided.