Skip to content

libhsscomm: bound the init callbacks with a timeout - #207

Open
hobbyquaker wants to merge 1 commit into
OpenCCU:mainfrom
hobbyquaker:fix/170-init-timeout
Open

hobbyquaker wants to merge 1 commit into
OpenCCU:mainfrom
hobbyquaker:fix/170-init-timeout

Conversation

@hobbyquaker

Copy link
Copy Markdown

HSSManager::XmlRpcCallSync() calls system.listMethods and listDevices on the receiver from PlatformInit(), inside the daemon's main loop, with an XmlRpcClient that has no timeout. A receiver that accepts the connection and never answers (a hung logic layer, a port forwarded to something that stalls) therefore freezes rfd or hs485d completely - no RPC for any other client, no events, no radio - until that connection closes.

Give the client a 30 s timeout. A timed-out call takes the existing transport error path, so such a receiver costs at most two timeouts per init instead of the whole daemon. 30 s is three times the event dispatcher's bound and well beyond the answer time of a healthy receiver's listDevices, which a false timeout would skip until its next init.

Fixes #170

HSSManager::XmlRpcCallSync() calls system.listMethods and listDevices on
the receiver from PlatformInit(), inside the daemon's main loop, with an
XmlRpcClient that has no timeout. A receiver that accepts the connection
and never answers (a hung logic layer, a port forwarded to something that
stalls) therefore freezes rfd or hs485d completely - no RPC for any other
client, no events, no radio - until that connection closes.

Give the client a 30 s timeout. A timed-out call takes the existing
transport error path, so such a receiver costs at most two timeouts per
init instead of the whole daemon. 30 s is three times the event
dispatcher's bound and well beyond the answer time of a healthy
receiver's listDevices, which a false timeout would skip until its next
init.

Fixes OpenCCU#170
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e55916ce-9983-4931-85ce-be737a1336f6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libhsscomm, libXmlRpc: init with a receiver that does not answer freezes the whole daemon

1 participant