mirror of
https://github.com/monero-project/monero.git
synced 2025-12-23 07:29:11 -08:00
Merge pull request #7271
4e74385a1 fix accessing an network address in a deleted context (moneromooo-monero)
This commit is contained in:
@@ -2835,12 +2835,15 @@ skip:
|
||||
epee::string_tools::to_string_hex(context.m_pruning_seed) <<
|
||||
"), score " << score << ", flush_all_spans " << flush_all_spans);
|
||||
|
||||
if (score > 0)
|
||||
m_p2p->add_host_fail(context.m_remote_address, score);
|
||||
|
||||
m_block_queue.flush_spans(context.m_connection_id, flush_all_spans);
|
||||
|
||||
// copy since dropping the connection will invalidate the context, and thus the address
|
||||
const auto remote_address = context.m_remote_address;
|
||||
|
||||
m_p2p->drop_connection(context);
|
||||
|
||||
if (score > 0)
|
||||
m_p2p->add_host_fail(remote_address, score);
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
template<class t_core>
|
||||
|
||||
Reference in New Issue
Block a user