From b6824ee9df175c4fdf6d60e425e531ae39dec0b2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 15 Apr 2010 08:37:40 +0000 Subject: [PATCH] fix --- src/fs/gnunet-service-fs.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 1c93b88f3..c305825b8 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -2582,7 +2582,15 @@ handle_p2p_get (void *cls, bits = 0; cps = GNUNET_CONTAINER_multihashmap_get (connected_peers, &other->hashPubKey); - GNUNET_assert (NULL != cps); + if (NULL == cps) + { + /* peer must have just disconnected */ + GNUNET_STATISTICS_update (stats, + gettext_noop ("# requests dropped due to initiator not being connected"), + 1, + GNUNET_NO); + return GNUNET_SYSERR; + } if (0 != (bm & GET_MESSAGE_BIT_RETURN_TO)) cp = GNUNET_CONTAINER_multihashmap_get (connected_peers, &opt[bits++]); -- 2.25.1