Author: toad
Date: 2008-02-23 00:11:25 +0000 (Sat, 23 Feb 2008)
New Revision: 18120

Modified:
   trunk/freenet/src/freenet/node/CHKInsertSender.java
Log:
Timeout: either the transfer failed, or we timed out waiting for a final ack.
Success: we got the final ack.

Modified: trunk/freenet/src/freenet/node/CHKInsertSender.java
===================================================================
--- trunk/freenet/src/freenet/node/CHKInsertSender.java 2008-02-23 00:05:00 UTC 
(rev 18119)
+++ trunk/freenet/src/freenet/node/CHKInsertSender.java 2008-02-23 00:11:25 UTC 
(rev 18120)
@@ -81,6 +81,7 @@
                                }
                        } else {
                                this.receivedNotice(false);
+                               
pn.localRejectedOverload("TransferFailedInsert");
                        }
                }

@@ -90,10 +91,6 @@
                                completedTransfer = true;
                                notifyAll();
                        }
-                       if(success)
-                               pn.successNotOverload();
-                       else
-                               
pn.localRejectedOverload("TransferFailedInsert");
                        synchronized(backgroundTransfers) {
                                backgroundTransfers.notifyAll();
                        }
@@ -121,6 +118,7 @@
                }

                public void onMatched(Message m) {
+                       pn.successNotOverload();
                        PeerNode pn = (PeerNode) m.getSource();
                        // pn cannot be null, because the filters will prevent 
garbage collection of the nodes

@@ -149,6 +147,7 @@
                           if this times out, we don't have any time to report 
to the node of origin the timeout notification (anyTimedOut?).
                         */
                        Logger.error(this, "Timed out waiting for a final ack 
from: "+pn+" on "+this);
+                       pn.localRejectedOverload("InsertTimeoutNoFinalAck");
                        receivedNotice(false);
                }



Reply via email to