Merge pull request #2930
7f4bb612
levin_protocol_handler_async: add missing response handler locking (moneromooo-monero)
This commit is contained in:
commit
effdc82b58
|
@ -379,13 +379,17 @@ public:
|
||||||
if(m_cache_in_buffer.size() < m_current_head.m_cb)
|
if(m_cache_in_buffer.size() < m_current_head.m_cb)
|
||||||
{
|
{
|
||||||
is_continue = false;
|
is_continue = false;
|
||||||
if(cb >= MIN_BYTES_WANTED && !m_invoke_response_handlers.empty())
|
if(cb >= MIN_BYTES_WANTED)
|
||||||
|
{
|
||||||
|
CRITICAL_REGION_LOCAL(m_invoke_response_handlers_lock);
|
||||||
|
if (!m_invoke_response_handlers.empty())
|
||||||
{
|
{
|
||||||
//async call scenario
|
//async call scenario
|
||||||
boost::shared_ptr<invoke_response_handler_base> response_handler = m_invoke_response_handlers.front();
|
boost::shared_ptr<invoke_response_handler_base> response_handler = m_invoke_response_handlers.front();
|
||||||
response_handler->reset_timer();
|
response_handler->reset_timer();
|
||||||
MDEBUG(m_connection_context << "LEVIN_PACKET partial msg received. len=" << cb);
|
MDEBUG(m_connection_context << "LEVIN_PACKET partial msg received. len=" << cb);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue