Skip to content

The library needs to be able to recover from errors #896

Open
@oleh-derevenko

Description

@oleh-derevenko

In case of communication or operation errors the library must provide means for client code to recover from the errors and return to normal operation. Writing to log only is insufficient.
In particular, consider roles/server_endpoint.hpp line 187.

    if (start_ec == error::async_accept_not_listening) {
        endpoint_type::m_elog->write(log::elevel::info,
            "Stopping acceptance of new connections because the underlying transport is no longer listening.");
    } else if (start_ec) { // <------------------------------------------------- HERE!
        endpoint_type::m_elog->write(log::elevel::rerror,
            "Restarting async_accept loop failed: "+ec.message());
    }

Here, after an error on accept continuation (for whatever reason) the code just writes a log and stops with no means to detect the error or recover from it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCoreFixedIssue is fixed but not yet released

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions