Repository navigation
libhsscomm: bound the init callbacks with a timeout - #207
Open
hobbyquaker wants to merge 1 commit into
Open
hobbyquaker wants to merge 1 commit into
hobbyquaker wants to merge 1 commit into
Conversation
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
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
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.
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