Connection reset by peer

Suggestions and discussion of future versions
n0xlf
Member
Member
Posts: 15
Joined: Mon Mar 08, 2010 1:42 am

Connection reset by peer

Post 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?
n0xlf
Member
Member
Posts: 15
Joined: Mon Mar 08, 2010 1:42 am

Re: Connection reset by peer

Post by n0xlf »

I see this with the 1.2.3 release as well...
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Connection reset by peer

Post by Cas »

you could try lt 0.15 with 1.2.3
n0xlf
Member
Member
Posts: 15
Joined: Mon Mar 08, 2010 1:42 am

Re: Connection reset by peer

Post 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...
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Connection reset by peer

Post 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
n0xlf
Member
Member
Posts: 15
Joined: Mon Mar 08, 2010 1:42 am

Re: Connection reset by peer

Post 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...
n0xlf
Member
Member
Posts: 15
Joined: Mon Mar 08, 2010 1:42 am

Re: Connection reset by peer

Post 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...
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Connection reset by peer

Post 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.
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Connection reset by peer

Post 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 :)
n0xlf
Member
Member
Posts: 15
Joined: Mon Mar 08, 2010 1:42 am

Re: Connection reset by peer

Post by n0xlf »

Excellent! I'll try to get it all compiled today and let ya know...
Post Reply