Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Jul 7, 2023
1 parent d72f89f commit cd2d553
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/ylt/coro_io/client_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class client_pool : public std::enable_shared_from_this<
coro_io::detail::client_queue<std::unique_ptr<client_t>> free_clients_;
client_pools_t* pools_manager_ = nullptr;
async_simple::Promise<async_simple::Unit> idle_timeout_waiter;
std::string_view host_name_;
std::string host_name_;
pool_config pool_config_;
io_context_pool_t& io_context_pool_;
std::atomic<std::size_t> collecter_cnt_;
Expand Down
4 changes: 2 additions & 2 deletions src/coro_http/examples/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Lazy<void> qps_watcher() {
}

int main() {
std::vector<std::string> hosts;
hosts.emplace_back("http://www.baidu.com", "http://baidu.com");
std::vector<std::string_view> hosts{"http://baidu.com",
"http://www.baidu.com"};
auto chan = coro_io::channel<coro_http_client>::create(
hosts, coro_io::channel<coro_http_client>::channel_config{
.pool_config{.max_connection_ = 1000}});
Expand Down
2 changes: 1 addition & 1 deletion src/coro_rpc/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/tests/coro_rpc)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/examples/coro_rpc)
add_subdirectory(base_examples)
add_subdirectory(file_transfer)

Expand Down
4 changes: 2 additions & 2 deletions src/coro_rpc/examples/base_examples/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Lazy<void> qps_watcher() {
}

int main() {
auto hosts = std::vector<std::string>{
{std::string{"127.0.0.1:8801"}, std::string{"localhost:8801"}}};
auto hosts = std::vector<std::string_view>{
{"127.0.0.1:8801", "localhost:8801"}};
auto worker_cnt = std::thread::hardware_concurrency() * 20;
auto chan = coro_io::channel<coro_rpc_client>::create(
hosts, coro_io::channel<coro_rpc_client>::channel_config{
Expand Down

0 comments on commit cd2d553

Please sign in to comment.