From ad72e5cbdf794662f6081a3fd0416815d0b1baac Mon Sep 17 00:00:00 2001
From: jrandom <jrandom>
Date: Tue, 14 Dec 2004 12:14:41 +0000
Subject: [PATCH] 2004-12-14  jrandom     * Reenable the probabalistic drop on
 the TCP queues to deal with good old       fashioned bandwidth limiting. 
 However, by default the probability is       rigged to reserve 0% of the
 queue free - meaning we just aggressively       fail messages in the queue if
 we're transferring too slowly.  That       reservation factor can be
 increased with 'tcp.queueFreeFactor=0.25'       (or whatever) and the drop
 code can be disabled with the parameter      
 'tcp.dropProbabalistically=false'.     * Still penalize a peer on tunnel
 failure, but don't immediately drop       their capacity to 0.     * More
 aggressively ACK duplicates     * Randomize the timestamper period     *
 Display the clock skew on the connection logs when a peer sends it.     *
 Allow the timestamper to fix skews of up to 10 minutes     * Logging

---
 .../i2p/router/message/OutboundClientMessageOneShotJob.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java b/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java
index a737a5de1e..06fa4e393a 100644
--- a/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java
+++ b/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java
@@ -269,13 +269,14 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
      *
      */
     private void send() {
+        if (_finished) return;
         long token = getContext().random().nextLong(I2NPMessage.MAX_ID_VALUE);
         PublicKey key = _leaseSet.getEncryptionKey();
         SessionKey sessKey = new SessionKey();
         Set tags = new HashSet();
         LeaseSet replyLeaseSet = null;
         if (_shouldBundle) {
-            replyLeaseSet = getContext().netDb().lookupLeaseSetLocally(_clientMessage.getFromDestination().calculateHash());
+            replyLeaseSet = getContext().netDb().lookupLeaseSetLocally(_from.calculateHash());
         }
         
         GarlicMessage msg = OutboundClientMessageJobHelper.createGarlicMessage(getContext(), token, 
-- 
GitLab