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

Proofs RPC long-polling #28

Merged
merged 1 commit into from Mar 27, 2019
Merged

Proofs RPC long-polling #28

merged 1 commit into from Mar 27, 2019

Conversation

moshababo
Copy link
Contributor

Implemented long-polling support for GetMembershipProof & GetProof RPC calls. I didn't use gRPC stream (server side push) because there's only one update, so I thought that long-polling is more appropriate.

Server timeouts are not handled at the moment, since they are expected to be very long anyway.

<-r.closedChan
} else {
select {
case <-r.closedChan:
Copy link
Contributor

Choose a reason for hiding this comment

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

why read from channel here if you have a default statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to check whether closedChan was closed. if so, then it will proceed, instead of the default case, which basically checks if it wasn't closed.

@moshababo moshababo merged commit a38c079 into develop Mar 27, 2019
@fasmat fasmat deleted the rpc_wait_result branch November 29, 2022 10: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.

None yet

2 participants