mirror of
https://github.com/monero-project/monero.git
synced 2026-07-28 14:47:15 -07:00
foreach_connection() can race with connection destruction while the protocol handler remains in the raw-pointer map. Use the non-throwing weak_from_this().lock() in add_ref() and treat expired connections as unavailable. This is an interim mitigation pending the broader connection lifetime fix in PR 7345.