Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf006a79

Browse files
committed
Fixed to pass test
1 parent38492e8 commitf006a79

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ struct http_async_connection
322322
// this can be used as a signaling mechanism for the user to
323323
// determine that the body is now ready for processing, even
324324
// though the callback is already provided.
325-
//this->body_promise.set_value("");
325+
this->body_promise.set_value("");
326326

327327
// The invocation of the callback is synchronous to allow us
328328
// to
@@ -439,7 +439,12 @@ struct http_async_connection
439439
case headers:
440440
this->headers_promise.set_exception(boost::copy_exception(error));
441441
case body:
442-
this->body_promise.set_exception(boost::copy_exception(error));
442+
if (!callback) {
443+
// N.B. if callback is non-null, then body_promise has
444+
// already been set to value "" to indicate body is
445+
// handled by streaming handler so no exception should be set
446+
this->body_promise.set_exception(boost::copy_exception(error));
447+
}
443448
break;
444449
default:
445450
BOOST_ASSERT(false &&"Bug, report this to the developers!");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp