fix 1814
authorChristian Grothoff <christian@grothoff.org>
Sun, 2 Oct 2011 22:38:36 +0000 (22:38 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 2 Oct 2011 22:38:36 +0000 (22:38 +0000)
src/util/connection.c

index 00f35dc81ed513c2ba03ffec58a6a9a6a905f148..bb5df7f5733b4b70765d6c5fb90942f16e61907c 100644 (file)
@@ -810,7 +810,8 @@ try_connect_using_address (void *cls, const struct sockaddr *addr,
   if (addr == NULL)
   {
     h->dns_active = NULL;
-    if (NULL == h->ap_head)
+    if ( (NULL == h->ap_head) &&
+        (NULL == h->sock) )
       connect_fail_continuation (h);
     return;
   }
@@ -901,7 +902,7 @@ GNUNET_CONNECTION_create_from_connect (const struct GNUNET_CONFIGURATION_Handle
                                        uint16_t port)
 {
   struct GNUNET_CONNECTION_Handle *ret;
-
   GNUNET_assert (0 < strlen (hostname));        /* sanity check */
   ret = GNUNET_malloc (sizeof (struct GNUNET_CONNECTION_Handle));
   ret->cfg = cfg;