Skip to content

Commit c6ce376

Browse files
committed
fixes
1 parent c871838 commit c6ce376

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/aws/crt/http/HttpConnection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ namespace Aws
226226

227227
int WriteData(
228228
std::shared_ptr<Aws::Crt::Io::InputStream> stream,
229-
OnWriteDataComplete &onComplete,
229+
const OnWriteDataComplete &onComplete,
230230
bool endStream = false) noexcept;
231231

232232
private:

source/http/HttpConnection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ namespace Aws
379379

380380
int HttpClientStream::WriteData(
381381
std::shared_ptr<Aws::Crt::Io::InputStream> stream,
382-
OnWriteDataComplete &onComplete,
382+
const OnWriteDataComplete &onComplete,
383383
bool endStream) noexcept
384384
{
385385
aws_http_stream_write_data_options options{};
@@ -390,7 +390,7 @@ namespace Aws
390390
OnWriteUserData data{};
391391
data.callback = onComplete;
392392
data.callbackData = m_callbackData;
393-
options.user_data = &onComplete;
393+
options.user_data = &data;
394394

395395
return aws_http_stream_write_data(m_stream, &options);
396396
}

0 commit comments

Comments
 (0)