docs: @Override
    public synchronized void handlePeerDisconnected(SharingPeer peer) {
      BitSet availablePieces = peer.getAvailablePieces();
  
      for (int i = availablePieces.nextSetBit(0); i >= 0;
           i = availablePieces.nextSetBit(i + 1)) {
        this.pieces[i].noLongerAt(peer);
      }
  
      Set<Piece> requested = peer.getRequestedPieces();
      if (requested != null) {
        for (Piece piece : requested) {
          this.requestedPieces.set(piece.getIndex(), false);
        }
      }
  
      myDownloaders.remove(peer);
  
      try {
        closeFileChannelIfNecessary();
      } catch (IOException e) {
        logger.info("I/O error on attempt to close file storage: " + e.toString());
      }
  
      logger.debug("Peer {} went away with {} piece(s) [{}/{}].",
              new Object[]{
                      peer,
                      availablePieces.cardinality(),
                      this.completedPieces.cardinality(),
                      this.pieces.length
              });
      logger.trace("We now have {} piece(s) and {} outstanding request(s): {}",
              new Object[]{
                      this.completedPieces.cardinality(),
                      this.requestedPieces.cardinality(),
                      this.requestedPieces
              });
      eventDispatcher.multicaster().peerDisconnected(peer);
    }