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

Conversation

Projects
None yet
2 participants
@moshababo
Copy link
Collaborator

moshababo commented Mar 27, 2019

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.

@moshababo moshababo requested a review from antonlerner Mar 27, 2019

<-r.closedChan
} else {
select {
case <-r.closedChan:

This comment has been minimized.

Copy link
@antonlerner

antonlerner Mar 27, 2019

Member

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

This comment has been minimized.

Copy link
@moshababo

moshababo Mar 27, 2019

Author Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.