From c5b856ac7c1ac2e516c07382ace4103251fe66dc Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 6 Feb 2015 22:36:43 +1100 Subject: [PATCH] Update notify after setting proxy before reconnecting clients --- src/stratifier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index d8a0df36..28ce0ad2 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1814,7 +1814,7 @@ static char *stratifier_stats(ckpool_t *ckp, sdata_t *sdata) } /* Sets the currently active proxy */ -static void set_proxy(sdata_t *sdata, const char *buf) +static void set_proxy(ckpool_t *ckp, sdata_t *sdata, const char *buf) { proxy_t *proxy; int id = 0; @@ -1826,6 +1826,7 @@ static void set_proxy(sdata_t *sdata, const char *buf) sdata->proxy = proxy; mutex_unlock(&sdata->proxy_lock); + _update_notify(ckp, id); reconnect_clients(sdata, ""); } @@ -1936,7 +1937,7 @@ retry: } else if (cmdmatch(buf, "reconnect")) { reconnect_clients(sdata, buf); } else if (cmdmatch(buf, "proxy")) { - set_proxy(sdata, buf); + set_proxy(ckp, sdata, buf); } else if (cmdmatch(buf, "loglevel")) { sscanf(buf, "loglevel=%d", &ckp->loglevel); } else