Skip to content

Commit 5f34973

Browse files
committed
Fix connection passing
1 parent 33c9c54 commit 5f34973

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/RequestImpl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ size_t ValidateCompleteSocks5ConnectReply(uint8_t *buf, size_t len) {
223223
return hdr_len;
224224
}
225225

226-
void DoSocks5Handshake(Connection::ptr_t connection,
226+
void DoSocks5Handshake(const Connection::ptr_t& connection,
227227
const Url& url,
228228
const Request::Properties::ptr_t& properties,
229229
Context& ctx) {
@@ -287,7 +287,7 @@ void DoSocks5Handshake(Connection::ptr_t connection,
287287
}
288288

289289

290-
void DoProxyConnect(Connection::ptr_t connection,
290+
void DoProxyConnect(const Connection::ptr_t& connection,
291291
const Url& url,
292292
const Request::Properties::ptr_t& properties,
293293
Context& ctx) {
@@ -328,8 +328,6 @@ void DoProxyConnect(Connection::ptr_t connection,
328328
//sets status_code, reason_phrase in response
329329
stream->ReadServerResponse(proxy_response);
330330

331-
connection.reset();
332-
333331
} catch (const exception& ex) {
334332
RESTC_CPP_LOG_DEBUG_("DoProxyConnect: exception from ReceivingFromProxy: " << ex.what());
335333
throw;

0 commit comments

Comments
 (0)