smux icon indicating copy to clipboard operation
smux copied to clipboard

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

Open sintanial opened this issue 4 years ago • 4 comments

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 avatar May 24 '20 06:05 sintanial

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%) :arrow_down:
session.go 78.84% <75.00%> (-1.23%) :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 637399a...1f49810. Read the comment docs.

codecov[bot] avatar May 24 '20 06:05 codecov[bot]

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

xtaci avatar May 24 '20 07:05 xtaci

Mmm we may not send data for version 1

sintanial avatar May 24 '20 08:05 sintanial

Add condition for v2 only

sintanial avatar May 24 '20 09:05 sintanial