diff --git a/src/kademlia/dht_tracker.cpp b/src/kademlia/dht_tracker.cpp index 526b94b37..f3af64994 100644 --- a/src/kademlia/dht_tracker.cpp +++ b/src/kademlia/dht_tracker.cpp @@ -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) diff --git a/src/kademlia/rpc_manager.cpp b/src/kademlia/rpc_manager.cpp index 770b11bf5..3883b04ea 100644 --- a/src/kademlia/rpc_manager.cpp +++ b/src/kademlia/rpc_manager.cpp @@ -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); }