no latency can happen, should be rare
authorChristian Grothoff <christian@grothoff.org>
Mon, 19 Sep 2011 09:38:36 +0000 (09:38 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 19 Sep 2011 09:38:36 +0000 (09:38 +0000)
src/fs/gnunet-service-fs_cp.c

index 69fb75be6f3f76e92767e63e9270df16d16ad5a6..49b01724feb772a84cf895b3550e4cbf25c964eb 100644 (file)
@@ -335,14 +335,9 @@ get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
     atsi++;
   if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
   {
-    static int once;
-
-    if (!once)
-    {
-      once = 1;
-      GNUNET_break (0);
-    }
-    /* how can we not have latency data? */
+    /* We sometime have no latency data, i.e. if the address came from 
+       peerinfo and we never had a chance to play transport-level 
+       PING/PONG yet. Assume 1s in that case. */
     return GNUNET_TIME_UNIT_SECONDS;
   }
   return GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,