return GNUNET_YES;
}
+static int reconnecting;
/**
* Function we use for handling incoming messages.
uint32_t bytes_physical;
GNUNET_assert (NULL != h->client);
+ if (GNUNET_YES == reconnecting)
+ {
+ return;
+ }
if (NULL == msg)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Error receiving from transport service, disconnecting temporarily.\n");
+ reconnecting = GNUNET_YES;
disconnect_and_schedule_reconnect (h);
return;
}
GNUNET_assert (NULL == h->client);
GNUNET_assert (NULL == h->control_head);
GNUNET_assert (NULL == h->control_tail);
+ reconnecting = GNUNET_NO;
h->client = GNUNET_CLIENT_connect ("transport", h->cfg);
+
GNUNET_assert (NULL != h->client);
schedule_control_transmit (h, sizeof (struct StartMessage), &send_start, h);
}
{
GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
+/* LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Client disconnect done \n");*/
}
/* Forget about all neighbours that we used to be connected to */
GNUNET_CONTAINER_multipeermap_iterate (h->neighbours,