P2PServer: fixed use after free on shutdown

pull/271/head
SChernykh 2023-05-25 10:11:24 +02:00
parent d08ac60fd9
commit 2cdb8b5323
1 changed files with 4 additions and 0 deletions

View File

@ -1029,6 +1029,10 @@ int P2PServer::deserialize_block(const uint8_t* buf, uint32_t size, bool compact
void P2PServer::on_timer()
{
if (m_pool->stopped()) {
return;
}
++m_timerCounter;
if (!m_initialPeerList.empty()) {