Advertisement
Guest User

Untitled

a guest
Jun 16th, 2013
271
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *** announcer.c.orig 2013-06-16 15:11:52.507123934 +0000
  2. --- announcer.c 2013-06-16 15:47:51.927108785 +0000
  3. *************** on_announce_error (tr_tier * tier, const
  4. *** 1001,1006 ****
  5. --- 1001,1014 ----
  6.  
  7. /* schedule a reannounce */
  8. interval = getRetryInterval (tier->currentTracker);
  9. +
  10. + /* HACK BEGIN */
  11. + if((tier->currentTracker != NULL)&&(err == strstr(err,"Tracker gave HTTP response code 0"))) {
  12. + dbgmsg (tier, "Forcing announce retry because of the connection refused n**** issue");
  13. + interval = tier->currentTracker->consecutiveFailures;
  14. + }
  15. + /* HACK END */
  16. +
  17. dbgmsg (tier, "Retrying announce in %d seconds.", interval);
  18. tr_torinf (tier->tor, "Retrying announce in %d seconds.", interval);
  19. tier_announce_event_push (tier, e, tr_time () + interval);
  20. *************** on_scrape_error (tr_session * session, t
  21. *** 1266,1271 ****
  22. --- 1274,1287 ----
  23.  
  24. /* schedule a rescrape */
  25. interval = getRetryInterval (tier->currentTracker);
  26. +
  27. + /* HACK BEGIN */
  28. + if((tier->currentTracker != NULL)&&(errmsg == strstr(errmsg,"Tracker gave HTTP response code 0"))) {
  29. + dbgmsg (tier, "Forcing scrape retry because of the connection refused n**** issue");
  30. + interval = tier->currentTracker->consecutiveFailures;
  31. + }
  32. + /* HACK END */
  33. +
  34. dbgmsg (tier, "Retrying scrape in %zu seconds.", (size_t)interval);
  35. tr_torinf (tier->tor, "Retrying scrape in %zu seconds.", (size_t)interval);
  36. tier->lastScrapeSucceeded = false;
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement