From 523f7236ef288e506d746ab307c18e6bd67d0cb0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 25 Feb 2015 21:23:13 +1100 Subject: [PATCH] Break out of both loops on reconnect issue --- src/generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generator.c b/src/generator.c index a676bab3..512dac29 100644 --- a/src/generator.c +++ b/src/generator.c @@ -2004,7 +2004,7 @@ static void *proxy_recv(void *arg) if (parent_proxy(subproxy)) { LOGWARNING("Proxy %d:%s reconnect issue, dropping existing connection", subproxy->low_id, subproxy->si->url); - break; + goto out; } } continue; @@ -2014,7 +2014,7 @@ static void *proxy_recv(void *arg) LOGWARNING("Unhandled stratum message: %s", cs->buf); } while ((ret = read_socket_line(cs, 0)) > 0); } - +out: mutex_lock(&proxi->proxy_lock); HASH_ITER(sh, proxi->subproxies, subproxy, tmp) { subproxy->disabled = true;