- Fix dup torrent msg with magnets (tickets #433 and #504)

- Fix state when storage dies during transition out of magnet mode
    - Fix NPE in magnet mode
    - Error logging improvements
    - Support add-torrent with infohash alone
    - CSS tweaks
This commit is contained in:
zzz
2012-03-24 12:58:13 +00:00
parent 008c79e743
commit bdfca07626
8 changed files with 44 additions and 12 deletions

View File

@@ -348,7 +348,7 @@ public class TrackerClient extends I2PAppThread
} // *** end of trackers loop here
// Get peers from PEX
if (left > 0 && coordinator.needPeers() && (!meta.isPrivate()) && !stop) {
if (left > 0 && coordinator.needPeers() && (meta == null || !meta.isPrivate()) && !stop) {
Set<PeerID> pids = coordinator.getPEXPeers();
if (!pids.isEmpty()) {
_util.debug("Got " + pids.size() + " from PEX", Snark.INFO);
@@ -370,7 +370,7 @@ public class TrackerClient extends I2PAppThread
// Get peers from DHT
// FIXME this needs to be in its own thread
if (_util.getDHT() != null && (!meta.isPrivate()) && !stop) {
if (_util.getDHT() != null && (meta == null || !meta.isPrivate()) && !stop) {
int numwant;
if (left == 0 || event.equals(STOPPED_EVENT) || !coordinator.needPeers())
numwant = 1;