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

fix(rpc): close streaming calls on shutdown #717

Merged
merged 1 commit into from
Dec 2, 2018
Merged

Conversation

sangaman
Copy link
Collaborator

Fixes #699.

This tracks all active streaming gRPC calls and closes them when the gRPC server is shut down. Previously, active streaming calls would prevent xud from shutting down gracefully.

I've tested this and it works well for me. I also confirmed that the cancelled event is fired when any streaming call is ended by the client.

@sangaman sangaman added bug Something isn't working grpc gRPC API labels Nov 30, 2018
@ghost ghost assigned sangaman Nov 30, 2018
@ghost ghost added the in progress label Nov 30, 2018
@offerm
Copy link
Contributor

offerm commented Nov 30, 2018

Please also handle the case of a node having incoming connection. This will block shutdown too.

This tracks all active streaming gRPC calls and closes them when the
gRPC server is shut down. Previously, active streaming calls would
prevent `xud` from shutting down gracefully.

Fixes #699.
@sangaman
Copy link
Collaborator Author

sangaman commented Dec 2, 2018

@offerm I added a line to clear the streams after they've ended. And I think I see what you mean about incoming peers, I'll handle that in a separate PR though.

@offerm
Copy link
Contributor

offerm commented Dec 2, 2018

@sangaman sure. This PR however does not close #699 yet.

We need this fix to check #616

Thanks

@sangaman
Copy link
Collaborator Author

sangaman commented Dec 2, 2018

I'll open a separate issue for incoming peers interfering with the shutdown process.

@sangaman sangaman merged commit e6a2a5b into master Dec 2, 2018
@ghost ghost removed the in progress label Dec 2, 2018
@michael1011 michael1011 deleted the shutdown-streaming branch March 14, 2019 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working grpc gRPC API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xud doesn't shut down gracefully with active rpc streaming calls
2 participants