Schedule a reconnect attempt after the configured interval.
570{
571 if (!conn.reconnect_timer) {
572 conn.reconnect_timer = std::make_unique<asio::steady_timer>(
m_context);
573 }
574
575 conn.reconnect_timer->expires_after(
577
578 conn.reconnect_timer->async_wait(
579 [this, ep_id = conn.info.id](const asio::error_code& ec) {
580 if (ec == asio::error::operation_aborted) {
581 return;
582 }
583
587 return;
588 }
589
590 auto& c = *it->second;
591
592 c.socket = asio::ip::tcp::socket(
m_context);
593
595 "TCP endpoint {} attempting reconnect to {}:{}",
596 ep_id, c.info.remote_address, c.info.remote_port);
597
599 });
600}
#define MF_DEBUG(comp, ctx,...)
void start_connect(ConnectionState &conn)
Initiate async_connect for an outbound endpoint.
std::unordered_map< uint64_t, std::unique_ptr< ConnectionState > > m_connections
std::shared_mutex m_connections_mutex
asio::io_context & m_context
@ NetworkBackend
Network transport backend (UDP, TCP, SHM)
@ Core
Core engine, backend, subsystems.
uint32_t reconnect_interval_ms