Bobbi#164
Open
BobbiHao wants to merge 2 commits intoqicosmos:masterfrom
Open
Conversation
|
Code Coverage Report |
Owner
|
感谢提pr。 不过这个修复方法不太好,应该用设置tcp option方式去修复。 类似于: acceptor_.set_option(tcp::acceptor::reuse_address(true), ec);或者我稍晚点来修复这个问题吧。 |
Author
|
我的实际应用和自己写的小demo中这个reuse_address是无效的,reuse_address应该是解决TIME_WAIT状态下端口不可用的问题。我现在遇到的问题 是 子进程已经把端口号给listen了。 您可以按我这个角度改进改进 |
Owner
有效的,现在的代码中不能直接设置这个,要在listen的时候设置才有效。我晚点fix了,你再验证一下。 |
Author
|
好的 多谢 期待您的补丁 😀 |
Merged
Owner
|
#167 如果server启动的时候,指定的端口被占用,则server启动失败; 设置了reuse_address后,监听某个端口的server 正常stop之后,再启动server不会有端口被占用的问题; 你测测这个pr在你的场景下有没有解决问题。 |
This file contains hidden or 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
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.
解决 rest_rpc创建子进程, 退出后,端口号被子进程占用的问题