你好 关于 open_socket 局部代码疑问, 是否有 socket fd 泄露? #1535
Answered
by
cloudwu
wangzhione
asked this question in
Q&A
-
https://github.com/cloudwu/skynet/blob/master/skynet-src/socket_server.c#L664-L668 下面是看代码分析过程, 你看逻辑是否有问题呢 ? 感谢指正
但是 sock = socket( ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol ); 没有 close 啊 如果假设成立包括 在 new_fd 之前注册的 enable_read 也需要处理? 还有另外一个疑惑点, 对于 struct socekt { |
Beta Was this translation helpful? Give feedback.
Answered by
cloudwu
Feb 13, 2022
Replies: 1 comment 3 replies
-
谢谢。这里有问题,是代码更迭引起的。 stdatomic 也是后面改的,改漏了。 |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
wangzhione
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
谢谢。这里有问题,是代码更迭引起的。
原本 enable write 是不检查错误的,77311c7
stdatomic 也是后面改的,改漏了。