conn->setCloseCallback(
boost::bind(&TcpClient::removeConnection, this, _1)); // FIXME: unsafe
但是这个回调函数是TcpClient的成员函数, 而TcpConnection是由shared_ptr管理的, 如果TcpClient对象已经析构了, 但是TcpConnection对象还存在的情况下, 一旦连接断开了触发closecallback, 这时候就会产生问题了, 不知道这块是我理解的不对, 还是有意这么设计的?
--
You received this message because you are subscribed to the Google Groups "Muduo network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to muduo-library+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.