View in context in the libbitcoin Slack #general mirror.
libbitcoin-network stack to enable connect/accept suspension. Normally the connectors are allocated at startup and run in a callback loop, always attempting to maintain the configured number of connections. But for both backup and store full/fault conditions, we need to suspend this.
So I made those modifications, which were simple. The connector and acceptor classes are now constructed with a reference to an atomic bool, owned by p2p. This tells them to bypass connection attempts with a specific error code. Since certain errors result in a delayed retry (precluding tight loops on things like no internet or no addresses), this fits naturally into the design.