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

set the SO_LINGER=0 to tcp, http, tls, ssh probe #159

Merged
merged 1 commit into from
Jul 3, 2022

Conversation

haoel
Copy link
Contributor

@haoel haoel commented Jul 3, 2022

EaseProbe would create and close a new TCP connection every time, this would cause many TIME_WAIT connections

To solve this, we can set SO_LINGER=0, so the closed TCP connect won't have TIME_WAIT status.

Reference: https://stackoverflow.com/questions/3757289/when-is-tcp-option-so-linger-0-required

@haoel haoel requested review from proditis and zhao-kun July 3, 2022 11:27
@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #159 (56973a1) into main (b420236) will decrease coverage by 0.35%.
The diff coverage is 48.00%.

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
- Coverage   92.51%   92.15%   -0.36%     
==========================================
  Files          45       45              
  Lines        3219     3238      +19     
==========================================
+ Hits         2978     2984       +6     
- Misses        175      187      +12     
- Partials       66       67       +1     
Impacted Files Coverage Δ
probe/http/http.go 92.07% <13.33%> (-7.93%) ⬇️
probe/ssh/ssh.go 85.25% <100.00%> (+0.28%) ⬆️
probe/tcp/tcp.go 100.00% <100.00%> (ø)
probe/tls/tls.go 100.00% <100.00%> (ø)

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 b420236...56973a1. Read the comment docs.

@haoel haoel merged commit 598d8a4 into megaease:main Jul 3, 2022
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.

3 participants