java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.TunnelPeerSelector.PreConnectFailJob
All Implemented Interfaces:
Job
Enclosing class:
TunnelPeerSelector

private static final class TunnelPeerSelector.PreConnectFailJobextends JobImpl
Demotes a peer that could not be reached by a pre-connect probe.

Fired from OutNetMessage's failed-send path, so it runs only after the transport has exhausted its own retries for the probe. That distinguishes it from a single dropped packet: by then the peer has failed to answer across every transport we hold.

Uses ProfileOrganizer.demoteIfUnreachableNow(Hash) rather than the three-strike path because send-failure strikes already exist for in-use tunnels and count a congested path as much as a dead peer. A peer that cannot be connected to at all is unambiguous, and leaving it in the fast tier is what starves the pools.

  • Field Details

    • _peer

      private final Hash _peer
      The peer to retry a session with.
  • Constructor Details

    • PreConnectFailJob

      PreConnectFailJob(RouterContext ctx, Hash peer)
      Prepares to retry a failed pre-connect session.
      Parameters:
      ctx - the router context
      peer - the peer to retry
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Job
      Descriptive name of the task.
      Returns:
      the descriptive name of the task
    • runJob

      public void runJob()
      Description copied from interface: Job
      Actually perform the task. This call blocks until the Job is complete.