From 30142899b7a4d65dac64b5af33883f3b92be2fcc Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 26 Aug 2014 20:40:43 +1000 Subject: [PATCH] Provide console message when successfully resuming to a server in proxy mode --- src/generator.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index 26e03b67..3238849e 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1353,15 +1353,24 @@ static void kill_proxy(proxy_instance_t *proxi) static int proxy_loop(proc_instance_t *pi) { int sockd = -1, ret = 0, selret; + proxy_instance_t *proxi = NULL; + bool reconnecting = false; unixsock_t *us = &pi->us; ckpool_t *ckp = pi->ckp; - proxy_instance_t *proxi; char *buf = NULL; reconnect: + if (proxi) + reconnecting = true; proxi = live_proxy(ckp); if (!proxi) goto out; + if (reconnecting) { + connsock_t *cs = proxi->cs; + LOGWARNING("Successfully reconnected to %s:%s as proxy", + cs->url, cs->port); + reconnecting = false; + } /* We've just subscribed and authorised so tell the stratifier to * retrieve the first subscription. */