Skip to content

Asynchronous HTTP Server (0.10.1): multiple connection->write causes exception #271

@mb1986

Description

@mb1986
void HttpServer::operator() (
    server_type::request const& request,
    server_type::connection_ptr connection) {

        std::vector<server_type::response_header> headers;
        connection->set_status(server_type::connection::ok);
        connection->set_headers(
            boost::make_iterator_range(headers.begin(), headers.end()));

        for (int i = 0; i < 100; i++) {
            connection->write(data);
        }
    }

causes:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  Success

Program received signal SIGABRT, Aborted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions