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

Added stream.CloseWithError(error) method for ability to send error on another side #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sintanial
Copy link
Contributor

@sintanial sintanial commented May 24, 2020

Added stream.CloseWithError(error) method for ability to send error on another side

Sometimes you need to understand reason of why a particular stream was closed by another side
This is useful for both: tests and business logic.

If there is a suggestion on how to improve or ideas on how to pass an error interface instead of string, I’m ready to fix it ;)

@sintanial sintanial changed the title Added stream.Cancel(error) method for ability to send error on another side Added stream.CloseWithError(error) method for ability to send error on another side May 24, 2020
@codecov
Copy link

codecov bot commented May 24, 2020

Codecov Report

Merging #74 into master will decrease coverage by 1.21%.
The diff coverage is 67.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   83.47%   82.25%   -1.22%     
==========================================
  Files           6        6              
  Lines         708      744      +36     
==========================================
+ Hits          591      612      +21     
- Misses         97      109      +12     
- Partials       20       23       +3     
Impacted Files Coverage Δ
stream.go 82.22% <64.51%> (-1.49%) ⬇️
session.go 78.84% <75.00%> (-1.23%) ⬇️

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 637399a...1f49810. Read the comment docs.

@xtaci
Copy link
Owner

xtaci commented May 24, 2020

this is an incompatible change, the data after fin will terminate this connetion for old version.

@sintanial
Copy link
Contributor Author

Mmm we may not send data for version 1

@sintanial
Copy link
Contributor Author

Add condition for v2 only

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