better timeout, renew on significant progress means shorter timeout on hard(er) error...
authorChristian Grothoff <christian@grothoff.org>
Thu, 3 Jun 2010 05:31:08 +0000 (05:31 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 3 Jun 2010 05:31:08 +0000 (05:31 +0000)
src/transport/test_transport_api_reliability.c

index fe7b6590efa315e0046a4b213e97a09b1062eded..6be7373097ab3633d9d42004ab39aadead1500f6 100644 (file)
@@ -51,7 +51,7 @@
 /**
  * How long until we give up on transmitting the message?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 300)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 150)
 
 #define MTYPE 12345
 
@@ -200,7 +200,14 @@ notify_receive (void *cls,
 #endif
   n++;
   if (0 == (n % (TOTAL_MSGS/100)))
-    fprintf (stderr, ".");
+    {
+      fprintf (stderr, ".");
+      GNUNET_SCHEDULER_cancel (sched, die_task);
+      die_task = GNUNET_SCHEDULER_add_delayed (sched,
+                                              TIMEOUT,
+                                              &end_badly,
+                                              NULL);    
+    }
   if (n == TOTAL_MSGS)
     end ();
 }