brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
_fd should be reset if ResetFileDescriptor is going to return -1, otherwise the fd will be closed in callers like CheckConnectedAndKeepWrite or Server::StartInernal and socket lifecycle methods like BeforeRecycled or WaitAndReset.
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
No
Breaking backward compatibility(向后兼容性):
No
Check List:
Please make sure your changes are compilable(请确保你的更改可以通过编译).
When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
What problem does this PR solve?
Problem Summary:
_fd
should be reset ifResetFileDescriptor
is going to return -1, otherwise the fd will be closed in callers likeCheckConnectedAndKeepWrite
orServer::StartInernal
and socket lifecycle methods likeBeforeRecycled
orWaitAndReset
.What is changed and the side effects?
Changed:
Side effects:
Breaking backward compatibility(向后兼容性): No
Check List: