yarpc / yarpc-go

A message passing platform for Go
MIT License
401 stars 101 forks source link

[tlsmux] Update timeouts and use base context #2148

Closed jronak closed 1 year ago

jronak commented 1 year ago

Replace background context in the tls.Handkshake method with a context linked to the listener's lifecycle. The listener context is cancelled when the listener is closed, this stops the inflight handshakes.

codecov[bot] commented 1 year ago

Codecov Report

Merging #2148 (ece0ca2) into dev (f09f746) will increase coverage by 6.72%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #2148      +/-   ##
==========================================
+ Coverage   81.02%   87.74%   +6.72%     
==========================================
  Files         254      254              
  Lines       14242    14244       +2     
==========================================
+ Hits        11539    12498     +959     
+ Misses       2200     1349     -851     
+ Partials      503      397     -106     
Impacted Files Coverage Δ
transport/internal/tlsmux/listener.go 90.00% <100.00%> (+2.50%) :arrow_up:
transport/tchannel/peer.go 96.05% <0.00%> (-1.32%) :arrow_down:
peer/hashring32/internal/hashring32/hashring32.go 96.21% <0.00%> (-1.09%) :arrow_down:
yarpcconfig/builder.go 98.76% <0.00%> (+1.23%) :arrow_up:
peer/direct/direct.go 100.00% <0.00%> (+2.70%) :arrow_up:
pkg/lifecycle/once.go 95.06% <0.00%> (+3.70%) :arrow_up:
peer/roundrobin/list.go 90.00% <0.00%> (+4.00%) :arrow_up:
yarpcconfig/kit.go 100.00% <0.00%> (+4.65%) :arrow_up:
api/transport/header.go 100.00% <0.00%> (+5.55%) :arrow_up:
... and 40 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 f09f746...ece0ca2. Read the comment docs.