*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-08-01 21:08:34 +00:00
parent 09c761331b
commit 433b3fd27a
2 changed files with 12 additions and 2 deletions

View File

@ -445,7 +445,17 @@ namespace libtorrent { namespace detail
if (*i == m_listen_socket)
{
assert(m_listen_socket);
boost::shared_ptr<libtorrent::socket> s = (*i)->accept();
boost::shared_ptr<libtorrent::socket> s;
try
{
s = (*i)->accept();
}
catch(std::exception& e)
{
#ifndef NDEBUG
(*m_logger) << "accept failed: " << e.what() << "\n";
#endif
}
if (s)
{
s->set_blocking(false);

View File

@ -504,7 +504,7 @@ namespace libtorrent
req.url = m_torrent_file.trackers()[m_currently_trying_tracker].url;
req.num_want = std::max(
(m_policy->get_max_connections()
- m_policy->num_peers()) * 2, 0);
- m_policy->num_peers()), 0);
// default initialize, these should be set by caller
// before passing the request to the tracker_manager