* i2psnark:
- More listing fixes (more thanks to 'backup') - Start end game a little sooner
This commit is contained in:
@ -388,6 +388,7 @@ public class Peer implements Comparable
|
||||
* Sets whether or not we are interested in pieces from this peer.
|
||||
* Defaults to false. When interest is true and this peer unchokes
|
||||
* us then we start downloading from it. Has no effect when not connected.
|
||||
* @deprecated unused
|
||||
*/
|
||||
public void setInteresting(boolean interest)
|
||||
{
|
||||
|
@ -489,6 +489,13 @@ public class PeerCoordinator implements PeerListener
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This should be somewhat less than the max conns per torrent,
|
||||
* but not too much less, so a torrent doesn't get stuck near the end.
|
||||
* @since 0.7.14
|
||||
*/
|
||||
private static final int END_GAME_THRESHOLD = 8;
|
||||
|
||||
/**
|
||||
* Returns one of pieces in the given BitField that is still wanted or
|
||||
* -1 if none of the given pieces are wanted.
|
||||
@ -525,7 +532,7 @@ public class PeerCoordinator implements PeerListener
|
||||
// AND if there are almost no wanted pieces left (real end game).
|
||||
// If we do end game all the time, we generate lots of extra traffic
|
||||
// when the seeder is super-slow and all the peers are "caught up"
|
||||
if (wantedPieces.size() > 4)
|
||||
if (wantedPieces.size() > END_GAME_THRESHOLD)
|
||||
return -1; // nothing to request and not in end game
|
||||
// let's not all get on the same piece
|
||||
Collections.shuffle(requested);
|
||||
|
@ -697,7 +697,7 @@ public class I2PSnarkServlet extends Default {
|
||||
if (snark.meta.getFiles() != null)
|
||||
icon = "folder";
|
||||
else
|
||||
icon = toIcon(fullFilename);
|
||||
icon = toIcon(snark.meta.getName());
|
||||
out.write(toImg(icon));
|
||||
out.write(filename);
|
||||
if (remaining == 0 || snark.meta.getFiles() != null)
|
||||
|
@ -2,6 +2,7 @@
|
||||
* i2psnark:
|
||||
- More listing fixes
|
||||
- Revert choker change
|
||||
- Start end game a little sooner
|
||||
* Installer: Disable pack200 in updater again, doesn't work
|
||||
on Java 1.5
|
||||
* Remove jetty from updater - it's been in for a few
|
||||
|
@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 14;
|
||||
public final static long BUILD = 15;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
Reference in New Issue
Block a user