forked from premiere/premiere-libtorrent
may have fixed a problem with an uncaught exception when the network plug is pulled
This commit is contained in:
parent
726aa89434
commit
56a7fc35bc
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue