Repository navigation
fix(opds): classify listener failures, keep serving through interface hiccups - #159
Closed
phildenhoff wants to merge 1 commit into
Closed
phildenhoff wants to merge 1 commit into
phildenhoff wants to merge 1 commit into
Conversation
… hiccups - Bind failures are now classified: address-in-use and permission errors are permanent (clear message, no retry loop); other failures retry with exponential backoff and only surface as errors after repeated attempts. - A failing listener no longer tears down the others; partial success serves the bound addresses. - Transient interface-enumeration failures no longer stop running listeners; advertisement refreshes on the next successful snapshot. - plan_bindings takes a BindPolicy; globally-routable addresses are excluded from binding by default (reserved for auth-enabled sharing).
libcalibre Test Coverage ReportOverall coverage: 80.16% Coverage breakdown available in the artifacts. |
Member
Author
|
Superseded by #160: rather than hardening the reconcile loop, we removed it - sharing is now an explicit state machine (Stopped/Starting/Running/Waiting/Failed) with a Local network / All interfaces model. The error classification and BindPolicy from this PR were carried into the rework. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The sharing service's error handling was all-or-nothing in ways that produced wrong behavior in common situations:
getifaddrs-style failure shut down all listeners instead of riding it out.What this does
BindPolicy.plan_bindingsnow takes a policy; globally-routable addresses are excluded from binding by default. The flag exists so auth-enabled sharing (feat(opds): HTTP Basic auth and credential management #149) can open it deliberately.Testing
43 tests pass, including four new ones: persistent-failure isolation, transient-failure error-then-recover, enumeration-hiccup keep-serving, and the bind policy. The dead-listener test was updated for the new semantics (single failure no longer surfaces an error).
Notes for reviewers
This is the "PR-a" correctness fix from the sharing rework discussion; the bind-model rework (Local network / All networks modes) follows separately.