diff --git a/include/ylt/standalone/cinatra/coro_http_client.hpp b/include/ylt/standalone/cinatra/coro_http_client.hpp index 3474c7c9..1cd3d087 100644 --- a/include/ylt/standalone/cinatra/coro_http_client.hpp +++ b/include/ylt/standalone/cinatra/coro_http_client.hpp @@ -1722,7 +1722,6 @@ class coro_http_client : public std::enable_shared_from_this { if (chunk_size == 0) { // all finished, no more data chunked_buf_.consume(chunked_buf_.size()); - data.status = 200; data.eof = true; break; } diff --git a/include/ylt/standalone/cinatra/coro_http_connection.hpp b/include/ylt/standalone/cinatra/coro_http_connection.hpp index 9341aafb..c0cf383b 100644 --- a/include/ylt/standalone/cinatra/coro_http_connection.hpp +++ b/include/ylt/standalone/cinatra/coro_http_connection.hpp @@ -402,7 +402,7 @@ class coro_http_connection if (!remote_addr_.empty()) { return remote_addr_; } - set_address_impl(remote_addr_, false); + set_address_impl(remote_addr_); return remote_addr_; } diff --git a/include/ylt/standalone/cinatra/coro_http_server.hpp b/include/ylt/standalone/cinatra/coro_http_server.hpp index 55c11bab..0bb6b66c 100644 --- a/include/ylt/standalone/cinatra/coro_http_server.hpp +++ b/include/ylt/standalone/cinatra/coro_http_server.hpp @@ -863,8 +863,10 @@ class coro_http_server { } void init_address(std::string address) { +#if __has_include() easylog::logger<>::instance(); // init easylog singleton to make sure // server destruct before easylog. +#endif if (size_t pos = address.find(':'); pos != std::string::npos) { auto port_sv = std::string_view(address).substr(pos + 1);