ttrpc icon indicating copy to clipboard operation
ttrpc copied to clipboard

fix unix domain socket connection leak

Open shsjshentao opened this issue 3 years ago • 3 comments

When server reply data to client, then client close connection and have not received the data, server will receive a ECONNRESET error. At the moment, the code will ignore it and hang in shutdown channel.

After code fixed, it will return when happen broken connection with no error message print.

Signed-off-by: blade [email protected]

shsjshentao avatar Nov 26 '20 08:11 shsjshentao

Codecov Report

Merging #71 (b91122b) into master (bfba540) will decrease coverage by 5.33%. The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   73.58%   68.24%   -5.34%     
==========================================
  Files          11       11              
  Lines         708      611      -97     
==========================================
- Hits          521      417     -104     
- Misses        150      156       +6     
- Partials       37       38       +1     
Impacted Files Coverage Δ
client.go 73.88% <0.00%> (-8.44%) :arrow_down:
server.go 73.14% <25.00%> (-3.79%) :arrow_down:
codec.go 60.00% <0.00%> (-6.67%) :arrow_down:
services.go 41.79% <0.00%> (-5.58%) :arrow_down:
unixcreds_linux.go 50.00% <0.00%> (-3.85%) :arrow_down:
config.go 30.00% <0.00%> (-3.34%) :arrow_down:
channel.go 81.81% <0.00%> (-2.50%) :arrow_down:
metadata.go 90.62% <0.00%> (-2.40%) :arrow_down:
... and 2 more

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 bfba540...b91122b. Read the comment docs.

codecov-io avatar Nov 26 '20 09:11 codecov-io

@crosbymichael @cpuguy83 ptal

thaJeztah avatar Feb 08 '21 11:02 thaJeztah

@dmcgowan @cpuguy83 Could you take a look the change again? I'd like to make sure we can all agree about the direction before asking @shsjshentao rebase the PR.

kzys avatar Oct 26 '21 18:10 kzys

Alternative fix for ECONNRESET was merged, if there is still some parts relevant from this update, feel free to rebase and reopen

dmcgowan avatar Nov 09 '22 17:11 dmcgowan