removed assertion since you can not blame hostlist-client how often core dis/connect...
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 3 Nov 2010 09:03:04 +0000 (09:03 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 3 Nov 2010 09:03:04 +0000 (09:03 +0000)
instead code just ensures that the value is >= 0

src/hostlist/hostlist-client.c

index 789ae751f28a7fbc32a630045e8730ce49d53786..418c363090b0696b74c1a314850b9ee20d824f08 100644 (file)
@@ -1177,12 +1177,18 @@ handler_disconnect (void *cls,
                    const struct
                    GNUNET_PeerIdentity * peer)
 {
-  GNUNET_assert (stat_connection_count > 0);
+  /* GNUNET_assert (stat_connection_count > 0); */
+  if (stat_connection_count == 0)
+  {
+      GNUNET_break_op (0);
+      return;
+  }
+
   stat_connection_count--;
   GNUNET_STATISTICS_update (stats,
-                            gettext_noop ("# active connections"),
-                            -1,
-                            GNUNET_NO);
+                                                       gettext_noop ("# active connections"),
+                                                       -1,
+                                                       GNUNET_NO);
 }
 
 /**