Skip to content

Commit a13b5da

Browse files
author
Ognjen Sobajic
committed
Final correction for SSL.
1 parent f5ccbb1 commit a13b5da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Release/src/http/client/http_linux.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,16 +518,15 @@ namespace web { namespace http
518518
template <typename ReadHandler>
519519
void async_read_until_buffersize(size_t size, ReadHandler handler, linux_request_context* ctx)
520520
{
521+
size_t size_to_read = 0;
521522
if (ctx->m_ssl_stream)
522523
{
523-
size_t size_to_read = 0;
524524
if (ctx->m_response_buf.size() < size)
525525
size_to_read = size - ctx->m_response_buf.size();
526526
boost::asio::async_read(*ctx->m_ssl_stream, ctx->m_response_buf, boost::asio::transfer_at_least(size_to_read), handler);
527527
}
528528
else
529529
{
530-
size_t size_to_read = 0;
531530
if (ctx->m_response_buf.size() < size)
532531
size_to_read = size - ctx->m_response_buf.size();
533532
boost::asio::async_read(*ctx->m_socket, ctx->m_response_buf, boost::asio::transfer_at_least(size_to_read), handler);

0 commit comments

Comments
 (0)