may have fixed a problem with an uncaught exception when the network plug is pulled

This commit is contained in:
Arvid Norberg 2007-01-04 15:44:23 +00:00
parent 726aa89434
commit 56a7fc35bc
2 changed files with 7 additions and 2 deletions

View File

@ -219,9 +219,11 @@ namespace libtorrent { namespace dht
}
catch (std::exception& exc)
{
#ifndef NDEBUG
std::cerr << "exception-type: " << typeid(exc).name() << std::endl;
std::cerr << "what: " << exc.what() << std::endl;
assert(false);
#endif
};
void dht_tracker::refresh_timeout(asio::error_code const& e)

View File

@ -212,8 +212,11 @@ time_duration rpc_manager::tick()
return diff;
}
m_transactions[m_oldest_transaction_id].reset();
o->timeout();
try
{
m_transactions[m_oldest_transaction_id].reset();
o->timeout();
} catch (std::exception) {}
}
return milliseconds(timeout_ms);
}