Skip to content

Commit 9334f8e

Browse files
author
Valtteri Heikkila
committed
Clarified method names in http_linux.cpp
1 parent 7f15c89 commit 9334f8e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Release/src/http/client/http_linux.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace web { namespace http
9494
}
9595
}
9696

97-
void put(std::shared_ptr<linux_connection> connection)
97+
void release(std::shared_ptr<linux_connection> connection)
9898
{
9999
std::lock_guard<std::mutex> lock(m_connections_mutex);
100100

@@ -105,7 +105,7 @@ namespace web { namespace http
105105
m_connections.insert(connection);
106106
}
107107

108-
std::shared_ptr<linux_connection> get()
108+
std::shared_ptr<linux_connection> obtain()
109109
{
110110
std::lock_guard<std::mutex> lock(m_connections_mutex);
111111

@@ -421,7 +421,7 @@ namespace web { namespace http
421421
boost::system::error_code error;
422422
ctx->m_connection->m_socket.shutdown(tcp::socket::shutdown_both, error);
423423
ctx->m_connection->m_socket.close(error);
424-
ctx->m_connection = m_pool->get();
424+
ctx->m_connection = m_pool->obtain();
425425

426426
auto endpoint = *endpoints;
427427
if (ctx->m_ssl_stream)
@@ -995,7 +995,7 @@ namespace web { namespace http
995995
std::shared_ptr<_http_client_communicator> &client, http_request &request)
996996
{
997997
auto client_cast(std::static_pointer_cast<linux_client>(client));
998-
auto connection(client_cast->m_pool->get());
998+
auto connection(client_cast->m_pool->obtain());
999999
return std::make_shared<linux_client_request_context>(client, request, connection);
10001000
}
10011001

@@ -1013,7 +1013,7 @@ namespace web { namespace http
10131013
else
10141014
{
10151015
m_connection->m_socket.cancel(error);
1016-
std::static_pointer_cast<linux_client>(m_http_client)->m_pool->put(m_connection);
1016+
std::static_pointer_cast<linux_client>(m_http_client)->m_pool->release(m_connection);
10171017
}
10181018
}
10191019

0 commit comments

Comments
 (0)