Skip to content

Commit 2420067

Browse files
committed
Removing unnecessary stream sync() calls.
1 parent f9d5f74 commit 2420067

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

Release/src/http/client/http_linux.cpp

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,19 +1030,7 @@ namespace web { namespace http
10301030
if (to_read == 0)
10311031
{
10321032
ctx->m_body_buf.consume(CRLF.size());
1033-
ctx->_get_writebuffer().sync()
1034-
.then([ctx](pplx::task<void> op)
1035-
{
1036-
try
1037-
{
1038-
op.wait();
1039-
ctx->complete_request(ctx->m_downloaded);
1040-
}
1041-
catch (...)
1042-
{
1043-
ctx->report_exception(std::current_exception());
1044-
}
1045-
});
1033+
ctx->complete_request(ctx->m_downloaded);
10461034
}
10471035
else
10481036
{
@@ -1129,18 +1117,8 @@ namespace web { namespace http
11291117
}
11301118
else
11311119
{
1132-
writeBuffer.sync().then([ctx](pplx::task<void> op)
1133-
{
1134-
try
1135-
{
1136-
op.wait();
1137-
ctx->complete_request(ctx->m_downloaded);
1138-
}
1139-
catch (...)
1140-
{
1141-
ctx->report_exception(std::current_exception());
1142-
}
1143-
});
1120+
// Request is complete no more data to read.
1121+
ctx->complete_request(ctx->m_downloaded);
11441122
}
11451123
}
11461124
};

0 commit comments

Comments
 (0)