Changeset 3c45b038


Ignore:
Timestamp:
Nov 27, 2010 2:34:08 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8e98f58f
Parents:
ff828e6
Message:
  • i2psnark:
    • Drop queued outbound requests when choked
    • Redo some data structures and locking to hopefully prevent deadlock
    • Memory reduction part 3: Return partial pieces to PeerCoordinator? when choked
Location:
apps/i2psnark/java/src/org/klomp/snark
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/PartialPiece.java

    rff828e6 r3c45b038  
    2222     *
    2323     * @param piece Piece number requested.
    24      * @param bs length must be equal to the piece length
     24     * @param len must be equal to the piece length
    2525     */
    2626    public PartialPiece (int piece, int len) throws OutOfMemoryError {
  • apps/i2psnark/java/src/org/klomp/snark/PeerCheckerTask.java

    rff828e6 r3c45b038  
    5050  public void run()
    5151  {
    52     synchronized(coordinator.peers)
    53       {
    54         Iterator it = coordinator.peers.iterator();
    55         if ((!it.hasNext()) || coordinator.halted()) {
     52        List<Peer> peerList = coordinator.peerList();
     53        if (peerList.isEmpty() || coordinator.halted()) {
    5654          coordinator.peerCount = 0;
    5755          coordinator.interestedAndChoking = 0;
     
    7775        // Keep track of peers we remove now,
    7876        // we will add them back to the end of the list.
    79         List removed = new ArrayList();
     77        List<Peer> removed = new ArrayList();
    8078        int uploadLimit = coordinator.allowedUploaders();
    8179        boolean overBWLimit = coordinator.overUpBWLimit();
    82         while (it.hasNext())
    83           {
    84             Peer peer = (Peer)it.next();
     80        for (Peer peer : peerList) {
    8581
    8682            // Remove dying peers
    8783            if (!peer.isConnected())
    8884              {
    89                 it.remove();
    90                 coordinator.removePeerFromPieces(peer);
    91                 coordinator.peerCount = coordinator.peers.size();
     85                // This was just a failsafe, right?
     86                //it.remove();
     87                //coordinator.removePeerFromPieces(peer);
     88                //coordinator.peerCount = coordinator.peers.size();
    9289                continue;
    9390              }
     
    141138                   
    142139                    // Put it at the back of the list
    143                     it.remove();
    144140                    removed.add(peer);
    145141                  }
     
    154150
    155151                    // Put it at the back of the list for fairness, even though we won't be unchoking this time
    156                     it.remove();
    157152                    removed.add(peer);
    158153                  }
     
    167162                   
    168163                    // Put it at the back of the list
    169                     it.remove();
    170164                    removed.add(peer);
    171165                  }
     
    180174                   
    181175                    // Put it at the back of the list
    182                     it.remove();
    183176                    removed.add(peer);
    184177                  }
     
    196189                   
    197190                    // Put it at the back of the list
    198                     it.remove();
    199191                    removed.add(peer);
    200192                  }
     
    235227
    236228            // Put it at the back of the list
    237             coordinator.peers.remove(worstDownloader);
    238             coordinator.peerCount = coordinator.peers.size();
    239229            removed.add(worstDownloader);
    240230          }
     
    245235
    246236        // Put peers back at the end of the list that we removed earlier.
    247         coordinator.peers.addAll(removed);
    248         coordinator.peerCount = coordinator.peers.size();
     237        synchronized (coordinator.peers) {
     238            for(Peer peer : removed) {
     239                if (coordinator.peers.remove(peer))
     240                    coordinator.peers.add(peer);
     241            }
     242        }
    249243        coordinator.interestedAndChoking += removedCount;
    250244
     
    256250            coordinator.getStorage().cleanRAFs();
    257251
    258       }
    259252  }
    260253}
  • apps/i2psnark/java/src/org/klomp/snark/PeerConnectionOut.java

    rff828e6 r3c45b038  
    4343
    4444  // Contains Messages.
    45   private final List sendQueue = new ArrayList();
     45  private final List<Message> sendQueue = new ArrayList();
    4646 
    4747  private static long __id = 0;
     
    497497  }
    498498
     499  /**
     500   *  Remove all Request messages from the queue
     501   *  @since 0.8.2
     502   */
     503  void cancelRequestMessages() {
     504      synchronized(sendQueue) {
     505          for (Iterator<Message> it = sendQueue.iterator(); it.hasNext(); ) {
     506              if (it.next().type == Message.REQUEST)
     507                it.remove();
     508          }
     509      }
     510  }
     511
    499512  // Called by the PeerState when the other side doesn't want this
    500513  // request to be handled anymore. Removes any pending Piece Message
  • apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java

    rff828e6 r3c45b038  
    2323import java.io.IOException;
    2424import java.util.ArrayList;
     25import java.util.Collection;
    2526import java.util.Collections;
    2627import java.util.Iterator;
    2728import java.util.LinkedList;
    2829import java.util.List;
     30import java.util.Queue;
    2931import java.util.Random;
    3032import java.util.Timer;
     33import java.util.concurrent.LinkedBlockingQueue;
    3134
    3235import net.i2p.I2PAppContext;
     
    6366
    6467  // synchronize on this when changing peers or downloaders
    65   final List<Peer> peers = new ArrayList();
     68  // This is a Queue, not a Set, because PeerCheckerTask keeps things in order for choking/unchoking
     69  final Queue<Peer> peers;
    6670  /** estimate of the peers, without requiring any synchronization */
    6771  volatile int peerCount;
     
    7377
    7478  // Some random wanted pieces
    75   private List<Piece> wantedPieces;
    76 
    77   /** partial pieces */
     79  private final List<Piece> wantedPieces;
     80
     81  /** partial pieces - lock by synching on wantedPieces */
    7882  private final List<PartialPiece> partialPieces;
    7983
     
    97101    this.snark = torrent;
    98102
     103    wantedPieces = new ArrayList();
    99104    setWantedPieces();
    100105    partialPieces = new ArrayList(getMaxConnections() + 1);
     106    peers = new LinkedBlockingQueue();
    101107
    102108    // Install a timer to check the uploaders.
     
    110116  {
    111117    // Make a list of pieces
    112     // FIXME synchronize, clear and re-add instead?
    113     // Don't replace something we are synchronizing on.
    114     wantedPieces = new ArrayList();
    115     BitField bitfield = storage.getBitField();
    116     int[] pri = storage.getPiecePriorities();
    117     for(int i = 0; i < metainfo.getPieces(); i++) {
    118       // only add if we don't have and the priority is >= 0
    119       if ((!bitfield.get(i)) &&
    120           (pri == null || pri[i] >= 0)) {
    121         Piece p = new Piece(i);
    122         if (pri != null)
    123             p.setPriority(pri[i]);
    124         wantedPieces.add(p);
    125       }
    126     }
    127     Collections.shuffle(wantedPieces, _random);
     118      synchronized(wantedPieces) {
     119          wantedPieces.clear();
     120          BitField bitfield = storage.getBitField();
     121          int[] pri = storage.getPiecePriorities();
     122          for (int i = 0; i < metainfo.getPieces(); i++) {
     123              // only add if we don't have and the priority is >= 0
     124              if ((!bitfield.get(i)) &&
     125                  (pri == null || pri[i] >= 0)) {
     126                  Piece p = new Piece(i);
     127                  if (pri != null)
     128                      p.setPriority(pri[i]);
     129                  wantedPieces.add(p);
     130              }
     131          }
     132          Collections.shuffle(wantedPieces, _random);
     133      }
    128134  }
    129135
     
    134140  public List<Peer> peerList()
    135141  {
    136     synchronized(peers)
    137       {
    138142        return new ArrayList(peers);
    139       }
    140143  }
    141144
     
    156159  public int getPeers()
    157160  {
    158     synchronized(peers)
    159       {
    160161        int rv = peers.size();
    161162        peerCount = rv;
    162163        return rv;
    163       }
    164164  }
    165165
     
    255255  public boolean needPeers()
    256256  {
    257     synchronized(peers)
    258       {
    259257        return !halted && peers.size() < getMaxConnections();
    260       }
    261258  }
    262259 
     
    345342            // Add it to the beginning of the list.
    346343            // And try to optimistically make it a uploader.
    347             peers.add(0, peer);
     344            // Can't add to beginning since we converted from a List to a Queue
     345            // We can do this in Java 6 with a Deque
     346            //peers.add(0, peer);
     347            peers.add(peer);
    348348            peerCount = peers.size();
    349349            unchokePeer();
     
    359359  }
    360360
    361   // caller must synchronize on peers
    362   private static Peer peerIDInList(PeerID pid, List peers)
     361  /**
     362   * @return peer if peer id  is in the collection, else null
     363   */
     364  private static Peer peerIDInList(PeerID pid, Collection<Peer> peers)
    363365  {
    364366    Iterator<Peer> it = peers.iterator();
     
    430432    // other peer that are interested, but are choking us.
    431433    List<Peer> interested = new LinkedList();
    432     synchronized (peers) {
    433434        int count = 0;
    434435        int unchokedCount = 0;
     
    465466          }
    466467        interestedAndChoking = count;
    467     }
    468468  }
    469469
     
    529529   * -1 if none of the given pieces are wanted.
    530530   */
    531   public int wantPiece(Peer peer, BitField havePieces)
    532   {
     531  public int wantPiece(Peer peer, BitField havePieces) {
     532      return wantPiece(peer, havePieces, true);
     533  }
     534
     535  /**
     536   * Returns one of pieces in the given BitField that is still wanted or
     537   * -1 if none of the given pieces are wanted.
     538   *
     539   * @param record if true, actually record in our data structures that we gave the
     540   *               request to this peer. If false, do not update the data structures.
     541   * @since 0.8.2
     542   */
     543  private int wantPiece(Peer peer, BitField havePieces, boolean record) {
    533544    if (halted) {
    534545      if (_log.shouldLog(Log.WARN))
     
    540551      {
    541552        Piece piece = null;
    542         Collections.sort(wantedPieces); // Sort in order of rarest first.
     553        if (record)
     554            Collections.sort(wantedPieces); // Sort in order of rarest first.
    543555        List<Piece> requested = new ArrayList();
    544556        Iterator<Piece> it = wantedPieces.iterator();
     
    568580            // let's not all get on the same piece
    569581            // Even better would be to sort by number of requests
    570             Collections.shuffle(requested, _random);
     582            if (record)
     583                Collections.shuffle(requested, _random);
    571584            Iterator<Piece> it2 = requested.iterator();
    572585            while (piece == null && it2.hasNext())
     
    576589                    // limit number of parallel requests
    577590                    int requestedCount = 0;
    578                     synchronized(peers) {
    579591                        for (Peer pr : peers) {
    580592                            if (pr.isRequesting(p.getId())) {
     
    588600                            }
    589601                        }
    590                     }
    591602                    if (requestedCount >= MAX_PARALLEL_REQUESTS)
    592603                        continue;
     
    609620            }
    610621        }
    611         if (_log.shouldLog(Log.DEBUG))
    612             _log.debug("Now requesting: piece " + piece + " priority " + piece.getPriority());
    613         piece.setRequested(true);
     622        if (record) {
     623            if (_log.shouldLog(Log.DEBUG))
     624                _log.debug("Now requesting: piece " + piece + " priority " + piece.getPriority());
     625            piece.setRequested(true);
     626        }
    614627        return piece.getId();
    615628      }
     
    642655                      // As connections are already up, new Pieces will
    643656                      // not have their PeerID list populated, so do that.
    644                       synchronized(peers) {
    645657                          for (Peer p : peers) {
    646658                              PeerState s = p.state;
     
    651663                              }
    652664                          }
    653                       }
    654665                  }
    655666              }
     
    664675                   iter.remove();
    665676                   // cancel all peers
    666                    synchronized(peers) {
    667677                       for (Peer peer : peers) {
    668678                           peer.cancel(p.getId());
    669679                       }
    670                    }
    671680               }
    672681          }
     
    678687          // update request queues, in case we added wanted pieces
    679688          // and we were previously uninterested
    680           synchronized(peers) {
    681689              for (Peer peer : peers) {
    682690                  peer.request();
    683               }
    684691          }
    685692      }
     
    785792    // Announce to the world we have it!
    786793    // Disconnect from other seeders when we get the last piece
    787     synchronized(peers)
    788       {
    789794        List<Peer> toDisconnect = new ArrayList();
    790795        Iterator<Peer> it = peers.iterator();
     
    806811            p.disconnect(true);
    807812          }
    808       }
    809813   
    810814    return true;
    811815  }
    812816
     817  /** this does nothing but logging */
    813818  public void gotChoke(Peer peer, boolean choke)
    814819  {
     
    824829    if (interest)
    825830      {
    826         synchronized(peers)
    827           {
    828831            if (uploaders < allowedUploaders())
    829832              {
     
    836839                  }
    837840              }
    838           }
    839841      }
    840842
     
    894896      if (_log.shouldLog(Log.INFO))
    895897          _log.info("Partials received from " + peer + ": " + partials);
    896       synchronized(partialPieces) {
     898      synchronized(wantedPieces) {
    897899          for (PartialPiece pp : partials) {
    898900              if (pp.getDownloaded() > 0) {
     
    937939   */
    938940  public PartialPiece getPartialPiece(Peer peer, BitField havePieces) {
    939       // do it in this order to avoid deadlock (same order as in savePartialPieces())
    940       synchronized(partialPieces) {
    941           synchronized(wantedPieces) {
    942               // sorts by remaining bytes, least first
    943               Collections.sort(partialPieces);
    944               for (Iterator<PartialPiece> iter = partialPieces.iterator(); iter.hasNext(); ) {
    945                   PartialPiece pp = iter.next();
    946                   int savedPiece = pp.getPiece();
    947                   if (havePieces.get(savedPiece)) {
    948                      // this is just a double-check, it should be in there
    949                      for(Piece piece : wantedPieces) {
    950                          if (piece.getId() == savedPiece) {
    951                              piece.setRequested(true);
    952                              iter.remove();
    953                              if (_log.shouldLog(Log.INFO)) {
    954                                  _log.info("Restoring orphaned partial piece " + pp +
    955                                            " Partial list size now: " + partialPieces.size());
    956                              }
    957                              return pp;
    958                           }
     941      synchronized(wantedPieces) {
     942          // sorts by remaining bytes, least first
     943          Collections.sort(partialPieces);
     944          for (Iterator<PartialPiece> iter = partialPieces.iterator(); iter.hasNext(); ) {
     945              PartialPiece pp = iter.next();
     946              int savedPiece = pp.getPiece();
     947              if (havePieces.get(savedPiece)) {
     948                 // this is just a double-check, it should be in there
     949                 for(Piece piece : wantedPieces) {
     950                     if (piece.getId() == savedPiece) {
     951                         piece.setRequested(true);
     952                         iter.remove();
     953                         if (_log.shouldLog(Log.INFO)) {
     954                             _log.info("Restoring orphaned partial piece " + pp +
     955                                       " Partial list size now: " + partialPieces.size());
     956                         }
     957                         return pp;
    959958                      }
    960959                  }
     
    979978
    980979  /**
     980   * Called when we are downloading from the peer and may need to ask for
     981   * a new piece. Returns true if wantPiece() or getPartialPiece() would return a piece.
     982   *
     983   * @param peer the Peer that will be asked to provide the piece.
     984   * @param havePieces a BitField containing the pieces that the other
     985   * side has.
     986   *
     987   * @return if we want any of what the peer has
     988   * @since 0.8.2
     989   */
     990  public boolean needPiece(Peer peer, BitField havePieces) {
     991      synchronized(wantedPieces) {
     992          for (PartialPiece pp : partialPieces) {
     993              int savedPiece = pp.getPiece();
     994              if (havePieces.get(savedPiece)) {
     995                 // this is just a double-check, it should be in there
     996                 for(Piece piece : wantedPieces) {
     997                     if (piece.getId() == savedPiece) {
     998                         if (_log.shouldLog(Log.INFO)) {
     999                             _log.info("We could restore orphaned partial piece " + pp);
     1000                         }
     1001                         return true;
     1002                      }
     1003                  }
     1004              }
     1005          }
     1006      }
     1007      return wantPiece(peer, havePieces, false) > 0;
     1008  }
     1009
     1010  /**
    9811011   *  Remove saved state for this piece.
    9821012   *  Unless we are in the end game there shouldnt be anything in there.
     
    9841014   */
    9851015  private void removePartialPiece(int piece) {
    986       synchronized(partialPieces) {
     1016      synchronized(wantedPieces) {
    9871017          for (Iterator<PartialPiece> iter = partialPieces.iterator(); iter.hasNext(); ) {
    9881018              PartialPiece pp = iter.next();
     
    10011031  {
    10021032    // see if anybody else is requesting
    1003     synchronized (peers)
    1004       {
    1005         Iterator<Peer> it = peers.iterator();
    1006         while (it.hasNext()) {
    1007           Peer p = it.next();
     1033        for (Peer p : peers) {
    10081034          if (p.equals(peer))
    10091035            continue;
     
    10171043          }
    10181044        }
    1019       }
    10201045
    10211046    // nobody is, so mark unrequested
    10221047    synchronized(wantedPieces)
    10231048      {
    1024         Iterator<Piece> it = wantedPieces.iterator();
    1025         while (it.hasNext()) {
    1026           Piece p = it.next();
    1027           if (p.getId() == piece) {
    1028             p.setRequested(false);
     1049        for (Piece pc : wantedPieces) {
     1050          if (pc.getId() == piece) {
     1051            pc.setRequested(false);
    10291052            if (_log.shouldLog(Log.DEBUG))
    10301053              _log.debug("Removing from request list piece " + piece);
  • apps/i2psnark/java/src/org/klomp/snark/PeerListener.java

    rff828e6 r3c45b038  
    149149
    150150  /**
     151   * Called when we are downloading from the peer and may need to ask for
     152   * a new piece. Returns true if wantPiece() or getPartialPiece() would return a piece.
     153   *
     154   * @param peer the Peer that will be asked to provide the piece.
     155   * @param bitfield a BitField containing the pieces that the other
     156   * side has.
     157   *
     158   * @return if we want any of what the peer has
     159   * @since 0.8.2
     160   */
     161  boolean needPiece(Peer peer, BitField bitfield);
     162
     163  /**
    151164   * Called when the peer has disconnected and the peer task may have a partially
    152165   * downloaded piece that the PeerCoordinator can save
    153166   *
    154    * @param state the PeerState for the peer
     167   * @param peer the peer
     168   * @since 0.8.2
    155169   */
    156170  void savePartialPieces(Peer peer, List<PartialPiece> pcs);
     
    163177   *
    164178   * @return request (contains the partial data and valid length)
     179   * @since 0.8.2
    165180   */
    166181  PartialPiece getPartialPiece(Peer peer, BitField havePieces);
  • apps/i2psnark/java/src/org/klomp/snark/PeerState.java

    rff828e6 r3c45b038  
    6969  private Request lastRequest = null;
    7070
     71  // FIXME if piece size < PARTSIZE, pipeline could be bigger
    7172  private final static int MAX_PIPELINE = 5;               // this is for outbound requests
    7273  private final static int MAX_PIPELINE_BYTES = 128*1024;  // this is for inbound requests
     
    108109
    109110    if (choked) {
    110         // TODO
    111         // savePartialPieces
    112         // clear request list
     111        out.cancelRequestMessages();
     112        // old Roberts thrash us here, choke+unchoke right together
     113        List<PartialPiece> pcs = returnPartialPieces();
     114        if (!pcs.isEmpty()) {
     115            if (_log.shouldLog(Log.DEBUG))
     116                _log.debug(peer + " got choked, returning partial pieces to the PeerCoordinator: " + pcs);
     117            listener.savePartialPieces(this.peer, pcs);
     118        }
    113119    }
    114120  }
     
    433439
    434440  /**
    435    *  get partial pieces, give them back to PeerCoordinator
     441   *  Get partial pieces, give them back to PeerCoordinator.
     442   *  Clears the request queue.
    436443   *  @return List of PartialPieces, even those with an offset == 0, or empty list
    437444   *  @since 0.8.2
     
    446453              rv.add(new PartialPiece(req));
    447454      }
     455      outstandingRequests.clear();
     456      pendingRequest = null;
     457      lastRequest = null;
    448458      return rv;
    449459  }
     
    514524    addRequest();
    515525   
     526   /**** taken care of in addRequest()
    516527    synchronized(this)
    517528      {
     
    520531          setInteresting(false);
    521532      }
     533    ****/
    522534  }
    523535
     
    569581      {
    570582        synchronized (this) {
    571             out.sendRequests(outstandingRequests);
    572             if (_log.shouldLog(Log.DEBUG))
    573                 _log.debug("Resending requests to " + peer + outstandingRequests);
     583            if (!outstandingRequests.isEmpty()) {
     584                out.sendRequests(outstandingRequests);
     585                if (_log.shouldLog(Log.DEBUG))
     586                    _log.debug("Resending requests to " + peer + outstandingRequests);
     587            }
    574588        }
    575589      }
     
    584598   * Then send new requests if not choked.
    585599   * If nothing to request, send not interested if we were.
     600   *
     601   * This is called from several places:
     602   *<pre>
     603   *   By getOustandingRequest() when the first part of a chunk comes in
     604   *   By havePiece() when somebody got a new piece completed
     605   *   By chokeMessage() when we receive an unchoke
     606   *   By setInteresting() when we are now interested
     607   *   By PeerCoordinator.updatePiecePriorities()
     608   *</pre>
    586609   */
    587610  synchronized void addRequest()
     
    592615        more_pieces = outstandingRequests.size() < MAX_PIPELINE;
    593616        // We want something and we don't have outstanding requests?
    594         if (more_pieces && lastRequest == null)
     617        if (more_pieces && lastRequest == null) {
     618          // we have nothing in the queue right now
     619          if (!interesting) {
     620              // If we need something, set interesting but delay pulling
     621              // a request from the PeerCoordinator until unchoked.
     622              if (listener.needPiece(this.peer, bitfield)) {
     623                  setInteresting(true);
     624                  if (_log.shouldLog(Log.DEBUG))
     625                      _log.debug(peer + " addRequest() we need something, setting interesting, delaying requestNextPiece()");
     626              } else {
     627                  if (_log.shouldLog(Log.DEBUG))
     628                      _log.debug(peer + " addRequest() needs nothing");
     629              }
     630              return;
     631          }
     632          if (choked) {
     633              // If choked, delay pulling
     634              // a request from the PeerCoordinator until unchoked.
     635              if (_log.shouldLog(Log.DEBUG))
     636                  _log.debug(peer + " addRequest() we are choked, delaying requestNextPiece()");
     637              return;
     638          }
    595639          more_pieces = requestNextPiece();
    596         else if (more_pieces) // We want something
     640        } else if (more_pieces) // We want something
    597641          {
    598642            int pieceLength;
     
    622666      }
    623667
     668    // failsafe
     669    if (interesting && lastRequest == null && outstandingRequests.isEmpty())
     670        setInteresting(false);
     671
    624672    if (_log.shouldLog(Log.DEBUG))
    625673      _log.debug(peer + " requests " + outstandingRequests);
     
    634682  {
    635683    // Check that we already know what the other side has.
    636     if (bitfield != null)
    637       {
     684    if (bitfield != null) {
    638685        // Check for adopting an orphaned partial piece
    639686        PartialPiece pp = listener.getPartialPiece(peer, bitfield);
     
    650697        }
    651698
     699      /******* getPartialPiece() does it all now
    652700        // Note that in addition to the bitfield, PeerCoordinator uses
    653701        // its request tracking and isRequesting() to determine
     
    684732                lastRequest = req;
    685733                return true;
    686           } else {
     734        } else {
    687735                if (_log.shouldLog(Log.DEBUG))
    688736                    _log.debug(peer + " no more pieces to request");
    689           }
    690       }
     737        }
     738     *******/
     739    }
    691740
    692741    // failsafe
     
    708757  synchronized void setInteresting(boolean interest)
    709758  {
    710     if (_log.shouldLog(Log.DEBUG))
    711       _log.debug(peer + " setInteresting(" + interest + ")");
    712 
    713759    if (interest != interesting)
    714760      {
     761        if (_log.shouldLog(Log.DEBUG))
     762            _log.debug(peer + " setInteresting(" + interest + ")");
    715763        interesting = interest;
    716764        out.sendInterest(interest);
     
    723771  synchronized void setChoking(boolean choke)
    724772  {
    725     if (_log.shouldLog(Log.DEBUG))
    726       _log.debug(peer + " setChoking(" + choke + ")");
    727 
    728773    if (choking != choke)
    729774      {
     775        if (_log.shouldLog(Log.DEBUG))
     776            _log.debug(peer + " setChoking(" + choke + ")");
    730777        choking = choke;
    731778        out.sendChoke(choke);
  • apps/i2psnark/java/src/org/klomp/snark/Snark.java

    rff828e6 r3c45b038  
    746746  }
    747747
    748   /** coordinatorListener */
     748  /** CoordinatorListener - this does nothing */
    749749  public void peerChange(PeerCoordinator coordinator, Peer peer)
    750750  {
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    rff828e6 r3c45b038  
    852852        buf.append("\">").append(snark.storage.getBaseName()).append("</a>");
    853853        long len = snark.meta.getTotalLength();
    854         addMessage(_("Download finished: {0}", buf.toString()) + " (" + _("size: {0}B", DataHelper.formatSize2(len)) + ')');
     854        addMessage(_("Download finished: {0}", buf.toString())); // + " (" + _("size: {0}B", DataHelper.formatSize2(len)) + ')');
    855855        updateStatus(snark);
    856856    }
Note: See TracChangeset for help on using the changeset viewer.