brpc
brpc copied to clipboard
Fix tcp connect interrupt
What problem does this PR solve?
Issue Number:
Problem Summary:
tcp_connect被中断之后,返回结果是有问题的:
bthread_timed_connect / bthread_connect:butex_wait返回0,errno等于EWOULDBLOCK或者EINTR,最后tcp_connect返回一个未连接成功的socket fd。pthread_timed_connect:返回-1,errno等于EINTR。
What is changed and the side effects?
Changed:
当errno等于EWOULDBLOCK或者EINTR,pthread_fd_wait / bthread_fd_wait继续wait到连接成功或者失败。
Side effects:
-
Performance effects(性能影响):
-
Breaking backward compatibility(向后兼容性):
Check List:
- Please make sure your changes are compilable(请确保你的更改可以通过编译).
- When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
- Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).