From 10a0f31b2d73f188104be40d9c9c5057ffe6c788 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 19 Sep 2011 09:38:36 +0000 Subject: [PATCH] no latency can happen, should be rare --- src/fs/gnunet-service-fs_cp.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 69fb75be6..49b01724f 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -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, -- 2.25.1