From aa02e36327c787d5ac0893092cc86dec2d2b4f60 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 25 May 2009 07:04:14 +0000 Subject: [PATCH] retry web seeds when name lookup fails instead of discarding them --- src/torrent.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 8754e9436..300b7b23d 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2873,8 +2873,8 @@ namespace libtorrent { if (m_ses.m_alerts.should_post()) { - char msg[200]; - snprintf(msg, 200, "HTTP seed hostname lookup failed: %s", e.message().c_str()); + char msg[400]; + snprintf(msg, sizeof(msg), "HTTP seed hostname lookup failed: %s", e.message().c_str()); m_ses.m_alerts.post_alert( url_seed_alert(get_handle(), web.url, msg)); } @@ -2882,9 +2882,8 @@ namespace libtorrent (*m_ses.m_logger) << " ** HOSTNAME LOOKUP FAILED!**: " << web.url << "\n"; #endif - // the name lookup failed for the http host. Don't try - // this host again - m_web_seeds.erase(web); + // unavailable, retry in 30 minutes + retry_web_seed(web.url, web.type, 60 * 30); return; }