Author: robert
Date: 2007-12-20 21:19:23 +0000 (Thu, 20 Dec 2007)
New Revision: 16756

Modified:
   trunk/freenet/src/freenet/node/CHKInsertSender.java
Log:
possibly help an ordered-but-timedout chain


Modified: trunk/freenet/src/freenet/node/CHKInsertSender.java
===================================================================
--- trunk/freenet/src/freenet/node/CHKInsertSender.java 2007-12-20 20:40:23 UTC 
(rev 16755)
+++ trunk/freenet/src/freenet/node/CHKInsertSender.java 2007-12-20 21:19:23 UTC 
(rev 16756)
@@ -104,6 +104,9 @@

                public void onMatched(Message m) {
                        if (m==null) {
+                               /* FIXME: Cascading timeout...
+                                if this times out, we don't have any time to 
report to the node of origin the timeout notification (anyTimedOut?).
+                                ameliorated by 'cascading_timout_grace' 
(below) */
                                Logger.error(this, "Timed out waiting for a 
final ack from: "+pn);
                                receivedNotice(false);
                                return;
@@ -128,7 +131,8 @@
                }

                private MessageFilter getNotificationMessageFilter() {
-                       return MessageFilter.create().setField(DMT.UID, 
uid).setType(DMT.FNPInsertTransfersCompleted).setSource(pn).setTimeout(TRANSFER_COMPLETION_ACK_TIMEOUT);
+                       int cascading_timout_grace=500*(15-htl);
+                       return MessageFilter.create().setField(DMT.UID, 
uid).setType(DMT.FNPInsertTransfersCompleted).setSource(pn).setTimeout(TRANSFER_COMPLETION_ACK_TIMEOUT+cascading_timout_grace);
                }
        }



Reply via email to