diff --git a/lib_acl_cpp/include/acl_cpp/http/http_response.hpp b/lib_acl_cpp/include/acl_cpp/http/http_response.hpp index a46dfef02..ab4028b1a 100644 --- a/lib_acl_cpp/include/acl_cpp/http/http_response.hpp +++ b/lib_acl_cpp/include/acl_cpp/http/http_response.hpp @@ -15,8 +15,7 @@ class ACL_CPP_API http_response : public noncopyable { public: /** - * 构造函数:通过该构造函数传入的 socket_stream 流对象并 - * 不会被关闭,需要调用者自己关闭 + * 构造函数:通过该构造函数传入的 socket_stream 流对象将在本类析构时释放 * @param client {socket_stream*} 数据连接流,非空 * 注:该类实例在长连接时可以被多次使用,但一定得注意使用 * 顺序:get_body->response diff --git a/lib_acl_cpp/samples/http/http_response/main.cpp b/lib_acl_cpp/samples/http/http_response/main.cpp index b5c3fde83..264f5ce08 100644 --- a/lib_acl_cpp/samples/http/http_response/main.cpp +++ b/lib_acl_cpp/samples/http/http_response/main.cpp @@ -66,7 +66,7 @@ static void handle_request(acl::socket_stream* conn) break; } - conn->close(); + //conn->close(); printf(">>>> close client <<<<\r\n"); }