Skip to content

Commit

Permalink
Print keep alive status.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Nov 10, 2023
1 parent c8d0290 commit 22216bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions proxy/include/proxy/proxy_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@ namespace proxy {
inline net::awaitable<bool> http_proxy_get()
{
boost::system::error_code ec;
bool keep_alive = false;
std::optional<request_parser> parser;

while (!m_abort)
Expand All @@ -1340,6 +1341,7 @@ namespace proxy {
{
LOG_ERR << "http proxy id: "
<< m_connection_id
<< (keep_alive ? ", keepalive" : "")
<< ", http_proxy_get async_read: "
<< ec.message();

Expand All @@ -1351,7 +1353,8 @@ namespace proxy {
auto mth = std::string(req.method_string());
auto target_view = std::string(req.target());
auto pa = std::string(req[http::field::proxy_authorization]);
auto keepalive = req.keep_alive();

keep_alive = req.keep_alive();

LOG_DBG << "http proxy id: "
<< m_connection_id
Expand Down Expand Up @@ -1441,7 +1444,7 @@ namespace proxy {
LOG_DBG << "http proxy id: " << m_connection_id
<< ", transfer completed";

if (!keepalive)
if (!keep_alive)
break;
}

Expand Down Expand Up @@ -2071,6 +2074,7 @@ namespace proxy {
{
LOG_DBG << "start_web_connect, id: "
<< m_connection_id
<< (keep_alive ? ", keepalive" : "")
<< ", async_read_header: "
<< ec.message();
co_return;
Expand Down

0 comments on commit 22216bf

Please sign in to comment.