Changeset f492770
- Timestamp:
- Sep 23, 2008 6:47:10 PM (12 years ago)
- Branches:
- master
- Children:
- fbad8a1
- Parents:
- e5c7b79
- Location:
- router/java/src/net/i2p/router
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java
re5c7b79 rf492770 476 476 _log.info("Unreachable: " + l); 477 477 return l; 478 } 479 480 /** 481 * Get the peers that have recently rejected us for bandwidth 482 * recent == last 20s 483 * 484 */ 485 public List selectPeersRecentlyRejecting() { 486 synchronized (_reorganizeLock) { 487 long cutoff = _context.clock().now() - (20*1000); 488 int count = _notFailingPeers.size(); 489 List l = new ArrayList(count / 128); 490 for (Iterator iter = _notFailingPeers.values().iterator(); iter.hasNext(); ) { 491 PeerProfile prof = (PeerProfile) iter.next(); 492 if (prof.getTunnelHistory().getLastRejectedBandwidth() > cutoff) 493 l.add(prof.getPeer()); 494 } 495 return l; 496 } 478 497 } 479 498 -
router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java
re5c7b79 rf492770 177 177 178 178 Set peers = new HashSet(1); 179 peers.addAll(ctx.profileOrganizer().selectPeersRecentlyRejecting()); 179 180 // if (false && filterUnreachable(ctx, isInbound, isExploratory)) { 180 181 if (filterUnreachable(ctx, isInbound, isExploratory)) {
Note: See TracChangeset
for help on using the changeset viewer.