Skip to content

Commit

Permalink
Revert changes from 0549bbc
Browse files Browse the repository at this point in the history
- This was committed from upstream following cisco talos disclosure way back when...
- Appears a lot in this commit was bad
- Not sure if removal of the 'return false' in outer call will help, or cause problems. Worth a shot.
  • Loading branch information
who-biz committed Nov 28, 2019
1 parent e804535 commit 468e463
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions contrib/epee/include/net/levin_protocol_handler_async.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,12 @@ class async_protocol_handler
}
virtual ~async_protocol_handler()
{
m_deletion_initiated = true;
if(m_connection_initialized)
{
m_config.del_connection(this);
}
try {
m_deletion_initiated = true;
if(m_connection_initialized)
{
m_config.del_connection(this);
}

for (size_t i = 0; i < 60 * 1000 / 100 && 0 != boost::interprocess::ipcdetail::atomic_read32(&m_wait_count); ++i)
{
Expand All @@ -288,15 +289,18 @@ class async_protocol_handler
CHECK_AND_ASSERT_MES_NO_RET(0 == boost::interprocess::ipcdetail::atomic_read32(&m_wait_count), "Failed to wait for operation completion. m_wait_count = " << m_wait_count);

MTRACE(m_connection_context << "~async_protocol_handler()");
}

} catch (std::exception& e) {
MTRACE("Exception in levin_protocol_async:" << e.what() << std::endl);
}

}
bool start_outer_call()
{
MTRACE(m_connection_context << "[levin_protocol] -->> start_outer_call");
if(!m_pservice_endpoint->add_ref())
{
MERROR(m_connection_context << "[levin_protocol] -->> start_outer_call failed");
return false;
}
boost::interprocess::ipcdetail::atomic_inc32(&m_wait_count);
return true;
Expand Down

0 comments on commit 468e463

Please sign in to comment.