Page 1 of 2

Connection reset by peer

Posted: Sat Mar 27, 2010 9:37 pm
by n0xlf
Over the last few months of using dev builds, my torrents seem to lose the tracker with "Connection reset by peer". Obviously this implies something going on with the tracker end, but no one on the tracker I typically use is experiencing similar issues...

This could also be a libtorrent issue as well (and maybe even more likely)...

Anyone else seeing this?

Re: Connection reset by peer

Posted: Tue Apr 20, 2010 5:20 am
by n0xlf
I see this with the 1.2.3 release as well...

Re: Connection reset by peer

Posted: Tue Apr 20, 2010 12:32 pm
by Cas
you could try lt 0.15 with 1.2.3

Re: Connection reset by peer

Posted: Tue Apr 27, 2010 10:33 pm
by n0xlf
1.2.3 with libtorrent 0.14.10 (both via Fedora koji rpm packages) seems to be working...

So...Either a problem with libtorrent 0.15 and/or however it is compiling on my system...

Re: Connection reset by peer

Posted: Tue Apr 27, 2010 10:41 pm
by Cas
I did not realise you were using lt 0.15, i think this ticket is similar to your issue: http://dev.deluge-torrent.org/ticket/1213

Re: Connection reset by peer

Posted: Thu Apr 29, 2010 8:14 am
by n0xlf
That sounds mostly like the problem, although the particular tracker I use most often seems highly stable, which is contrary to the amount of reset by peer errors I was seeing...Whether it is the bug as reported, or it is creating its own reset by peer error somehow, the problem does seem to lie in libtorrent 0.15...

Re: Connection reset by peer

Posted: Thu Apr 29, 2010 8:19 am
by n0xlf
And now I see this...

Code: Select all

Thanks for the report!

Here's a patch that I believe will fix this:

Index: src/torrent.cpp
===================================================================
--- src/torrent.cpp	(revision 4490)
+++ src/torrent.cpp	(working copy)
@@ -5179,14 +5179,14 @@
 			if (i->is_working()) { tier = i->tier; found_working = false; }
 			if (i->fails >= i->fail_limit && i->fail_limit != 0) continue;
 			if (i->updating) { found_working = true; continue; }
-			if (i->is_working())
-			{
-				ptime next_tracker_announce = (std::max)(i->next_announce, i->min_announce);
-				if (!i->updating && next_tracker_announce < next_announce) next_announce = 
next_tracker_announce;
-				found_working = true;
-				if (!m_settings.announce_to_all_trackers
-					&& !m_settings.announce_to_all_tiers) break;
-			}
+			ptime next_tracker_announce = (std::max)(i->next_announce, i->min_announce);
+			if (!i->updating
+				&& next_tracker_announce < next_announce
+				&& (!found_working || i->is_working()))
+				next_announce = next_tracker_announce;
+			if (i->is_working()) found_working = true;
+			if (!m_settings.announce_to_all_trackers
+				&& !m_settings.announce_to_all_tiers) break;
 		}
 		if (next_announce == max_time()) return;
 
I've checked this in to the 0.15 branch and trunk as well.

So maybe I need to give it a try and see what happens...Although last I used the dev build of deluge, I had major problems with disappearing torrents...

Re: Connection reset by peer

Posted: Thu Apr 29, 2010 1:13 pm
by Cas
You dont need to use a dev build of Deluge to use a patched 0.15, simply use it with the 1.2.3 source. However the current dev version is approaching release (1.3.0) very shortly so I doubt you will find issues with it.

Re: Connection reset by peer

Posted: Thu Apr 29, 2010 2:32 pm
by johnnyg
Cas wrote:However the current dev version is approaching release (1.3.0) very shortly so I doubt you will find issues with it.
More importantly, if you do find issues then we can fix them :)

Re: Connection reset by peer

Posted: Thu Apr 29, 2010 5:36 pm
by n0xlf
Excellent! I'll try to get it all compiled today and let ya know...