tsloughter / grpcbox

Erlang grpc on chatterbox
Apache License 2.0
139 stars 62 forks source link

implement h2_stream:terminate callback #73

Closed psalin closed 2 years ago

psalin commented 2 years ago

The terminate callback makes it possible to notice when the stream was taken down unexpectedly without receiving end_stream, e.g. due to socket errors etc

In this case on_end_stream() is called also for termination. It will result in a second eos being sent in case END_STREAM also was received.

Fixes #72, needs tsloughter/chatterbox#13

codecov[bot] commented 2 years ago

Codecov Report

Merging #73 (7753aea) into main (0166760) will decrease coverage by 0.01%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
- Coverage   38.99%   38.97%   -0.02%     
==========================================
  Files          28       28              
  Lines        2090     2091       +1     
==========================================
  Hits          815      815              
- Misses       1275     1276       +1     
Impacted Files Coverage Δ
src/grpcbox_stream.erl 63.91% <0.00%> (-0.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0166760...7753aea. Read the comment docs.

tsloughter commented 2 years ago

Will release chatterbox and bump the dep after merging this.