Skip to content
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

FdChannel::HandleEvent(evpp_socket_t sockfd, short which) 函数 不安全 在执行的过程中 本身的channel对象被析构了 #273

Open
sweet-cn opened this issue Aug 25, 2021 · 0 comments

Comments

@sweet-cn
Copy link

TCPClient 在收到一条消息后 立即调用Disconnect() 这时TCPServer处理HandleEvent 处理kReadable事件 调用 read_fn_..最终会读取到0字节关闭tcpconn 并从tcpserver的容器中移除 tcpconn tcpconn 会析构 导致tcpconn里的channel也被析构。但是这个channel的HandleEvent函数还没有处理完,还要往下往下执行,判断kWritable等。。 打印日志验证了。

这种宕机的概率应该很小??请问这个问题是已知的,可以不用处理么??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant