fix
authorChristian Grothoff <christian@grothoff.org>
Thu, 15 Apr 2010 08:37:40 +0000 (08:37 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 15 Apr 2010 08:37:40 +0000 (08:37 +0000)
src/fs/gnunet-service-fs.c

index 1c93b88f3e6dfd3cad132b0f350290fba4f88010..c305825b8d11a7534d344a4d7b1c4acf94992e7c 100644 (file)
@@ -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++]);