Skip to content

Commit 468e463

Browse files
committed
Revert changes from 0549bbc
- 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.
1 parent e804535 commit 468e463

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

contrib/epee/include/net/levin_protocol_handler_async.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,12 @@ class async_protocol_handler
275275
}
276276
virtual ~async_protocol_handler()
277277
{
278-
m_deletion_initiated = true;
279-
if(m_connection_initialized)
280-
{
281-
m_config.del_connection(this);
282-
}
278+
try {
279+
m_deletion_initiated = true;
280+
if(m_connection_initialized)
281+
{
282+
m_config.del_connection(this);
283+
}
283284

284285
for (size_t i = 0; i < 60 * 1000 / 100 && 0 != boost::interprocess::ipcdetail::atomic_read32(&m_wait_count); ++i)
285286
{
@@ -288,15 +289,18 @@ class async_protocol_handler
288289
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);
289290

290291
MTRACE(m_connection_context << "~async_protocol_handler()");
291-
}
292292

293+
} catch (std::exception& e) {
294+
MTRACE("Exception in levin_protocol_async:" << e.what() << std::endl);
295+
}
296+
297+
}
293298
bool start_outer_call()
294299
{
295300
MTRACE(m_connection_context << "[levin_protocol] -->> start_outer_call");
296301
if(!m_pservice_endpoint->add_ref())
297302
{
298303
MERROR(m_connection_context << "[levin_protocol] -->> start_outer_call failed");
299-
return false;
300304
}
301305
boost::interprocess::ipcdetail::atomic_inc32(&m_wait_count);
302306
return true;

0 commit comments

Comments
 (0)