Implement when the upcall from reexpressInterest returns Closure.RESULT_REEXPRESS.
diff --git a/js/NDN.js b/js/NDN.js
index e6e1a37..90186a5 100644
--- a/js/NDN.js
+++ b/js/NDN.js
@@ -195,37 +195,40 @@
  *   this.transport.send to send the interest.
  */
 NDN.prototype.expressInterestHelper = function(interest, closure) {
+    var binaryInterest = encodeToBinaryInterest(interest);
+    var thisNDN = this;    
 	//TODO: check local content store first
 	if (closure != null) {
 		var pitEntry = new PITEntry(interest, closure);
         // TODO: This needs to be a single thread-safe transaction on a global object.
 		NDN.PITTable.push(pitEntry);
 		closure.pitEntry = pitEntry;
-	}
 
-	// Set interest timer
-    var thisNDN = this;
-	if (closure != null) {
+        // Set interest timer.
         var timeoutMilliseconds = (interest.interestLifetime || 4000);
-		pitEntry.timerID = setTimeout(function() {
-			if (LOG > 3) console.log("Interest time out.");
+        var timeoutCallback = function() {
+			if (LOG > 3) console.log("Interest time out: " + interest.name.to_uri());
 				
-			// Remove PIT entry from NDN.PITTable.
+			// Remove PIT entry from NDN.PITTable, even if we add it again later to re-express
+            //   the interest because we don't want to match it in the mean time.
             // TODO: Make this a thread-safe operation on the global PITTable.
 			var index = NDN.PITTable.indexOf(pitEntry);
-			//console.log(NDN.PITTable);
 			if (index >= 0) 
 	            NDN.PITTable.splice(index, 1);
-			//console.log(NDN.PITTable);
-			//console.log(pitEntry.interest.name.getName());
 				
 			// Raise closure callback
-			closure.upcall(Closure.UPCALL_INTEREST_TIMED_OUT, new UpcallInfo(thisNDN, interest, 0, null));
-		}, timeoutMilliseconds);
-		//console.log(closure.timerID);
+			if (closure.upcall(Closure.UPCALL_INTEREST_TIMED_OUT, 
+                  new UpcallInfo(thisNDN, interest, 0, null)) == Closure.RESULT_REEXPRESS) {
+			    if (LOG > 3) console.log("Re-express interest: " + interest.name.to_uri());
+                pitEntry.timerID = setTimeout(timeoutCallback, timeoutMilliseconds);
+                NDN.PITTable.push(pitEntry);
+                thisNDN.transport.send(binaryInterest);
+            }
+		};
+		pitEntry.timerID = setTimeout(timeoutCallback, timeoutMilliseconds);
 	}
 
-	this.transport.send(encodeToBinaryInterest(interest));
+	this.transport.send(binaryInterest);
 };
 
 NDN.prototype.registerPrefix = function(name, closure, flag) {