diff --git a/src/kademlia/rpc_manager.cpp b/src/kademlia/rpc_manager.cpp index fc7143dc9..e17c80c00 100644 --- a/src/kademlia/rpc_manager.cpp +++ b/src/kademlia/rpc_manager.cpp @@ -322,8 +322,11 @@ void rpc_manager::invoke(int message_id, udp::endpoint target_addr m_send(m); new_transaction_id(o); } - catch (std::exception&) + catch (std::exception& e) { +#ifndef NDEBUG + std::cerr << e.what() << "\n"; +#endif assert(false); } } diff --git a/src/session_impl.cpp b/src/session_impl.cpp index a80b40fb1..9a1ba1b7f 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -120,7 +120,7 @@ namespace libtorrent { namespace detail // if the job queue is empty and // we shouldn't abort // wait for a signal - if (m_torrents.empty() && !m_abort && !processing) + while (m_torrents.empty() && !m_abort && !processing) m_cond.wait(l); if (m_abort)