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

fix leaking of pool.Message #381

Merged
merged 1 commit into from
Aug 15, 2022
Merged

fix leaking of pool.Message #381

merged 1 commit into from
Aug 15, 2022

Conversation

jkralik
Copy link
Member

@jkralik jkralik commented Aug 12, 2022

No description provided.

@jkralik jkralik marked this pull request as ready for review August 12, 2022 15:34
@jkralik jkralik force-pushed the jkralik/fix/processParallelHandshakes branch from fb674c0 to 016aee1 Compare August 15, 2022 05:44
Base automatically changed from jkralik/fix/processParallelHandshakes to v3 August 15, 2022 05:51
@jkralik jkralik force-pushed the jkralik/fix/improveBlockwise branch from c101f5b to 4d45d54 Compare August 15, 2022 05:51
@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2022

Codecov Report

Merging #381 (71b285c) into v3 (3848d7e) will decrease coverage by 0.21%.
The diff coverage is 76.00%.

@@            Coverage Diff             @@
##               v3     #381      +/-   ##
==========================================
- Coverage   70.39%   70.17%   -0.22%     
==========================================
  Files          68       67       -1     
  Lines        5174     5089      -85     
==========================================
- Hits         3642     3571      -71     
+ Misses       1149     1136      -13     
+ Partials      383      382       -1     
Impacted Files Coverage Δ
net/client/client.go 63.20% <ø> (+1.88%) ⬆️
tcp/server/server.go 76.51% <ø> (-0.18%) ⬇️
dtls/client.go 72.85% <40.00%> (-4.29%) ⬇️
tcp/client.go 74.13% <40.00%> (-4.81%) ⬇️
net/blockwise/blockwise.go 67.74% <75.75%> (-0.80%) ⬇️
udp/server/server.go 81.30% <85.71%> (-1.25%) ⬇️
dtls/server/server.go 76.08% <100.00%> (-0.35%) ⬇️
udp/client.go 77.08% <100.00%> (-0.92%) ⬇️
udp/client/clientconn.go 71.72% <100.00%> (+0.08%) ⬆️
message/pool/pool.go 91.30% <0.00%> (-8.70%) ⬇️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jkralik jkralik force-pushed the jkralik/fix/improveBlockwise branch from 4d45d54 to 71b285c Compare August 15, 2022 05:59
net/blockwise/blockwise.go Outdated Show resolved Hide resolved
@@ -462,8 +430,8 @@ func (b *BlockWise[C]) Handle(w *responsewriter.ResponseWriter[C], r *pool.Messa
b.errors(fmt.Errorf("continueSendingMessage(%v): %w", r, err))
return
}
if b.autoCleanUpResponseCache && !more {
b.RemoveFromResponseCache(token)
if !more && sendingMessageCached.Data().Code() > codes.DELETE {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are codes > than codes.DELETE invalid or why are only those codes deleted from cache?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For codes GET,POST,PUT,DELETE, we want them to wait for pairing response and then delete them when the full response comes in or when timeout occurs.

@jkralik jkralik force-pushed the jkralik/fix/improveBlockwise branch from 71b285c to 317fb99 Compare August 15, 2022 10:42
@jkralik jkralik merged commit ba2022c into v3 Aug 15, 2022
@jkralik jkralik deleted the jkralik/fix/improveBlockwise branch August 15, 2022 10:55
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

3 participants