-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: support so_reuseaddr #280
Conversation
已重开,这次ok么? |
Codecov Report
@@ Coverage Diff @@
## dev #280 +/- ##
==========================================
+ Coverage 80.36% 80.49% +0.13%
==========================================
Files 19 19
Lines 1884 1892 +8
==========================================
+ Hits 1514 1523 +9
+ Misses 301 300 -1
Partials 69 69
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
gnet_test.go
Outdated
@@ -226,6 +246,7 @@ func testCodecServe( | |||
multicore, async bool, | |||
nclients int, | |||
reuseport bool, | |||
reuseaddr bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testCodecServe 这个测试里不需要加 reuseaddr 的测试,这里 reuseport 是需要测试不同线程模型,reuseaddr 不需要,所以麻烦这部分测试去掉。
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fixes panjf2000#266 Fixes panjf2000#272 Co-authored-by: zhongweikang <zhongweikang@sfmail.sf-express.com>
1. Are you opening this pull request for bug-fixes, optimizations or new feature?
new feature
2. Please describe how these code changes achieve your intention.
支持 so_reuseaddr 可以使得 gnet 在重启过程中,不必因为 timewait 原因而导致:bind: address already in use
3. Please link to the relevant issues (if any).
ISSUES #266
ISSUES #272
PR #275
4. Which documentation changes (if any) need to be made/updated because of this PR?
4. Checklist