+/**
+ * Task to re-try connecting to peerinfo.
+ *
+ * @param cls the 'struct GNUNET_PEERINFO_NotifyContext'
+ * @param tc scheduler context
+ */
+static void
+reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ struct GNUNET_PEERINFO_NotifyContext *nc = cls;
+
+ nc->task = GNUNET_SCHEDULER_NO_TASK;
+ nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg);
+ if (NULL == nc->client)
+ {
+ /* ugh */
+ nc->task =
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect, nc);
+ return;
+ }
+ request_notifications (nc);
+}
+
+