Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RPC Timout request and prevent blocking while waiting response #107

Conversation

yogihardi
Copy link

@yogihardi yogihardi commented Dec 4, 2022

closes #108

--

this PR is related to this request #98

The most significant issue was the rpc.Handler.Request function, in which the go routine could block indefinitely waiting for a response from the server.

I found that there are missed fixes from the last PR on the following line
https://github.com/eclipse/paho.golang/blob/e818d6af9263c1ff1c68749d9e87defb8f51690f/paho/extensions/rpc/rpc.go#L76

also, I proposed request timeout on RPC Request

Copy link
Contributor

@MattBrittan MattBrittan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR - I have added a few comments. Please note that you will need to complete the CLA (see contributingh.md) before this can be accepted (this process ensures that we have verification that all contributions are correctly licensed).

paho/extensions/rpc/rpc.go Outdated Show resolved Hide resolved
paho/extensions/rpc/rpc.go Outdated Show resolved Hide resolved
@yogihardi
Copy link
Author

hi @MattBrittan ,

thank you for your review.
i couldn't verify my eca, even though my email address is same and correct.

I got the following error message:

Failures:
Anonymous (<my email account>@****.com)

@MattBrittan
Copy link
Contributor

thank you for your review. i couldn't verify my eca, even though my email address is same and correct.

I have manually checked and the ECA system does not appear to have your address on file (note that email addresses used in Github are publicly available and easily retrieved from the patch). Can you please confirm that you have created an account and signed the ECA?

I'm OK with the PR itself (but unfortunately cannot accept it until we get the ECA sorted). Personally I'd probably just return the errCtx because most users would expect to check for the standard context errors but can also see some advantages to your approach.

…' of github.com:yogihardi/paho.golang into feature/add_timeout_and_prevent_blocking_on_rpc_request

* 'feature/add_timeout_and_prevent_blocking_on_rpc_request' of github.com:yogihardi/paho.golang:
  fix git username and email for ECA validation
@yogihardi yogihardi closed this Jan 10, 2023
@yogihardi yogihardi deleted the feature/add_timeout_and_prevent_blocking_on_rpc_request branch January 10, 2023 05:31
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.

Add RPC Request timeout and prevent request blocking
2 participants