fix #3871
authorChristian Grothoff <christian@grothoff.org>
Mon, 29 Jun 2015 08:11:26 +0000 (08:11 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 29 Jun 2015 08:11:26 +0000 (08:11 +0000)
src/ats/plugin_ats_proportional.c

index 7dae3c8bedcc7f3acaea317253abb25c4a8f88a0..9dea83c560ca41d4632b781491399d654c27b969 100644 (file)
@@ -824,9 +824,10 @@ update_active_address (struct GAS_PROPORTIONAL_Handle *s,
     aw_min = NULL;
     for (aw = asi_best->network->head; NULL != aw; aw = aw->next)
     {
-      if (con_min >
-          (a_con = s->env->get_connectivity (s->env->cls,
-                                             &aw->addr->peer)))
+      if ( (con_min >
+            (a_con = s->env->get_connectivity (s->env->cls,
+                                               &aw->addr->peer))) &&
+           (GNUNET_YES == aw->addr->active) )
       {
         aw_min = aw;
         con_min = a_con;