-
-
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 #275
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
panjf2000
reviewed
Nov 20, 2021
panjf2000
requested changes
Nov 20, 2021
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.
加一下测试。
已经删除了 SetReuseport 中的 so_reuseaddr 部分,并新增了测试 |
你自己测试过了吗? |
测试过了,设置了 so_reuseaddr 时,即便处于 timewait 状态,依然可以正常启动服务(此时没有设置 so_reuseport,主从Reactor也都在正常工作)。 |
麻烦 rebase 一下最新的 dev 分支代码。 |
Done |
你这不是 rebase 啊,现在的 git log 不对,这个 PR 也不对了,你重新在我的 dev 分支上拉一个分支再修改吧。 |
不好意思,那我重开一个 |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).
#266
#272
4. Which documentation changes (if any) need to be made/updated because of this PR?
4. Checklist