made lsd not throw on send failure

This commit is contained in:
Arvid Norberg 2007-05-12 18:53:37 +00:00
parent 573d9f55d6
commit e405dd3fda
1 changed files with 7 additions and 1 deletions

View File

@ -151,8 +151,14 @@ void lsd::announce(sha1_hash const& ih, int listen_port)
std::string const& msg = btsearch.str();
m_retry_count = 0;
asio::error_code ec;
m_socket.send_to(asio::buffer(msg.c_str(), msg.size() - 1)
, lsd_multicast_endpoint);
, lsd_multicast_endpoint, ec);
if (ec)
{
m_disabled = true;
return;
}
#if defined(TORRENT_LOGGING) || defined(TORRENT_VERBOSE_LOGGING)
m_log << time_now_string()