Skip to content

Commit 33ec776

Browse files
committed
Clang-tidy fixes for http session
1 parent 122ebf5 commit 33ec776

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/KDNetwork/http_session.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ std::shared_ptr<Socket> HttpSession::getConnection(const std::string &host, uint
179179
return connection.socket;
180180
}
181181

182-
void HttpSession::returnConnection(const std::string &host, uint16_t port, bool secure, std::shared_ptr<Socket> socket)
182+
void HttpSession::returnConnection(const std::string &host, uint16_t port, bool secure, const std::shared_ptr<Socket> &socket)
183183
{
184184
// Don't return invalid or disconnected sockets
185185
if (!socket || socket->state() != Socket::State::Connected) {

src/KDNetwork/http_session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class KDNETWORK_EXPORT HttpSession
180180
* @param secure Whether the connection uses SSL
181181
* @param socket The connection to return to the pool
182182
*/
183-
void returnConnection(const std::string &host, uint16_t port, bool secure, std::shared_ptr<Socket> socket);
183+
void returnConnection(const std::string &host, uint16_t port, bool secure, const std::shared_ptr<Socket> &socket);
184184

185185
/**
186186
* @brief Clean up idle connections

0 commit comments

Comments
 (0)