Project

General

Profile

Actions

Bug #3342

closed

Interests without explicit InterestLifetime do not trigger onTimeout callback

Added by Mathias Gibbens about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
11/17/2015
Due date:
% Done:

0%

Estimated time:

Description

When creating an Interest if InterestLifetime is not explicitly set before calling Face.expressInterest() the onTimeout callback is never executed.

In Node.java the method expressInterestHelper() only sets up the timeout callback if InterestLifetime >= 0. Since InterestLifetime == -1 if not specified, the timeout callback is ignored.

I think this is a bug, and was certainly unexpected, since I had read at http://named-data.net/doc/NDN-TLV/current/interest.html#interestlifetime that the default timeout for an Interest would be 4 seconds if a timeout was not specified. I was expecting that the jndn library would call my timeout handler after 4 seconds. It seems that the correct behavior should be to use a (local) InterestLifetime of 4 seconds in expressInterestHelper() if InterestLifetime == -1.

I have attached a simple test case showing this issue.


Files

JNDNTest.java (1.54 KB) JNDNTest.java Simple code showing bug Mathias Gibbens, 11/17/2015 12:58 PM

Related issues 1 (0 open1 closed)

Has duplicate NDN-CCL - Task #3194: expressInterest should call onTimeout even for unspecified interest lifetimeDuplicate09/10/2015

Actions
Actions #1

Updated by Anonymous about 9 years ago

  • Assignee set to Anonymous

Thanks for the report. You have a point. I hadn't considered the case where the interest lifetime is omitted, but expressInterest is supplied an OnTimeout callback. It think I understand your solution and agree: The library will still send the interest over the wire with the interest lifetime omitted. But if expressInterest is supplied an OnTimeout callback, then it will be called after 4000 milliseconds. Is that right?

Actions #2

Updated by Mathias Gibbens about 9 years ago

Jeff, yes, that's what I was thinking of.

Actions #3

Updated by Anonymous about 9 years ago

  • Project changed from jndn to NDN-CCL

OK. I moved this to the NDN-CCL project since it affects all the Common Client Libraries. I'll fix it first in jNDN.

Actions #4

Updated by Anonymous about 9 years ago

Hi Mathias. I merged the fix in jNDN. Can you try it and tell me if it does what you expect?

Actions #5

Updated by Mathias Gibbens about 9 years ago

Jeff, thanks! I've tested the fix and it now works as I was expecting when an Interest doesn't explicitly set the lifetime.

Actions #6

Updated by Anonymous about 9 years ago

  • Status changed from New to Closed

Thanks for checking. I updated the other libraries too.

Actions #7

Updated by Anonymous almost 9 years ago

  • Has duplicate Task #3194: expressInterest should call onTimeout even for unspecified interest lifetime added
Actions

Also available in: Atom PDF