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

Alternative grpcbox_channel stop function #59

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

psalin
Copy link
Collaborator

@psalin psalin commented Nov 9, 2021

Adds stop/2 for providing more graceful termination of a channel.
stop/1 will kill h2 streams which causes crash reports. For a similar
termination without crash reports grpcbox_channel:stop(Name, shutdown)
can now be called. Calling grpcbox_channel:stop(Name, normal) will
shutdown the h2_connection with stop instead of calling exit for it.

This addresses the issue described in #58

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Base: 39.16% // Head: 39.43% // Increases project coverage by +0.27% 🎉

Coverage data is based on head (d2d7813) compared to base (5ea123f).
Patch coverage: 60.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   39.16%   39.43%   +0.27%     
==========================================
  Files          28       28              
  Lines        2099     2107       +8     
==========================================
+ Hits          822      831       +9     
+ Misses       1277     1276       -1     
Impacted Files Coverage Δ
src/grpcbox_channel.erl 66.66% <40.00%> (-2.09%) ⬇️
src/grpcbox_subchannel.erl 70.00% <80.00%> (+12.85%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@psalin
Copy link
Collaborator Author

psalin commented Jun 7, 2022

I think this one actually might cause a report for the original way of stopping now that was not there before. Will try out it out a bit more and change it so that the original behavior is the same.

@psalin psalin force-pushed the alt_subchannel_stop branch from bec18c9 to 8a512ef Compare August 26, 2022 12:54
Adds stop/2 for providing more graceful termination of a channel.
stop/1 will kill h2 streams which causes crash reports. For a similar
termination without crash reports grpcbox_channel:stop(Name, shutdown)
can now be called. Calling grpcbox_channel:stop(Name, normal) will
shutdown the h2_connection with stop instead of calling exit for it.
@psalin psalin force-pushed the alt_subchannel_stop branch from 8a512ef to d2d7813 Compare September 29, 2022 06:35
@psalin
Copy link
Collaborator Author

psalin commented Sep 29, 2022

Fixed conflicts with the base branch. This one now works so that the original way of stopping with stop/1 works as before, while stop/2 provides a way to choose a more graceful shutdown.

@tsloughter tsloughter merged commit 1e696f6 into tsloughter:main Sep 30, 2022
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.

2 participants