File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
boost/network/protocol/http/client/connection Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ struct http_async_connection
322
322
// this can be used as a signaling mechanism for the user to
323
323
// determine that the body is now ready for processing, even
324
324
// though the callback is already provided.
325
- // this->body_promise.set_value("");
325
+ this ->body_promise .set_value (" " );
326
326
327
327
// The invocation of the callback is synchronous to allow us
328
328
// to
@@ -439,7 +439,12 @@ struct http_async_connection
439
439
case headers:
440
440
this ->headers_promise .set_exception (boost::copy_exception (error));
441
441
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
+ }
443
448
break ;
444
449
default :
445
450
BOOST_ASSERT (false && " Bug, report this to the developers!" );
You can’t perform that action at this time.
0 commit comments