eproxy
eproxy copied to clipboard
多次释放资源问题
因为每次都会讲conn和other添加至全局链表,在关闭过程中遍历链表,此处不应释放两次
void closeconn(int efd, struct conn *conn)
{
if (conn->other)
delconn(efd, conn->other);
delconn(efd, conn);
}
应该为:
void closeconn(int efd, struct conn *conn)
{
delconn(efd, conn);
}